Welcome Guest, Not a member yet? Register   Sign In
My CI is not redirecting automatically to index.php
#1

[eluser]Wondering Coder[/eluser]
Hi,

I have a problem, I've just set up an individual installation of php-apache-mysql and got it working. Then I downloaded a fresh CI 2.0.2. But now the problem is when I enter this link: http://localhost/codeigniter(just shows the folders inside the codeigniter) it doesn't redirect to the index.php. So I need to manually enter in the uri the index.php then it will redirect to the welcome.php.

I think this is not the problem in htaccess, maybe its how I setup my web server. Anyone knows how to solve this?
#2

[eluser]Wondering Coder[/eluser]
ok, fixed the problem in my index.php. but now I have a huge problem. I can't login in my application. My application work like login then the username and password get validated in my method validate_credentials(). In my previous setup in xampp my application is working.

The requested URL /dcs-pps/login/validate_credentials was not found on this server.

It sounds like server can't locate the validate_credential method. Can anyone tell me the problem?
#3

[eluser]jblack199[/eluser]
server configuration probably... but couldnt really tell you... i could say that its because someone is outside right now trying to steal a car in your neighborhood but that wouldnt be accurate..

http://localhost/codeigniter/index.php/d...redentials -- try that.. because odds are thats what the url should be...
#4

[eluser]Wondering Coder[/eluser]
actually the link looks like this [email=http://localhost/dcs-pps/login/validate_credentials][/email]

do you think my htaccess is causing this?

anyway this my htaccess
Code:
RewriteEngine on
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule (.*) index.php/$1 [L]
#5

[eluser]jblack199[/eluser]
You could do something more like this...

Code:
RewriteEngine On
    RewriteBase /http://localhost/vb/

    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /vb/index.php?/$1 [L]
    
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /vb/index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

of course changing all the rewrite rules for your own specificaton... i myself have never had much luck getting .htaccess to work on my localhost so now i just upload on save to a hidden folder on my linux server and call it good lol..




Theme © iAndrew 2016 - Forum software by © MyBB