08-08-2012, 06:23 AM
[eluser]Sy[/eluser]
I'm been using code igniter for a while now, trying to get to grips with mod_rewite too in order to remove the relevent index.php.
Its all working on my Wampserver. However I've got a really odd problem which i can't pin down to an issue with Code igniter or my mod_rewrite.
basically accessing the path
http://localhost/MYAPPNAME/Main/Login
I get the login page as expected.
however accessing
http://localhost/myappname/Main/Login
returns a page not found!
The strange thing is that both
http://localhost/myappname/
http://localhost/MYAPPNAME/
successfully return my welcome page, hence I can only think that the fault is somewhere within the CodeIgniter system itself, rather than my .htaccess ( which i've added below)
Its odd as well as I'm using a windows file system so my understanding is case should be completely interchangeable.
Has anyone experienced this problem before? Its a massive issue. to be honest i don't care if its EITHER uppercase or lower case, but that fact that i can get to my main page either way and only one of the instances actually works make is aweful.
I know there isn't much infomation here but if anyone can help..?
I'm been using code igniter for a while now, trying to get to grips with mod_rewite too in order to remove the relevent index.php.
Its all working on my Wampserver. However I've got a really odd problem which i can't pin down to an issue with Code igniter or my mod_rewrite.
basically accessing the path
http://localhost/MYAPPNAME/Main/Login
I get the login page as expected.
however accessing
http://localhost/myappname/Main/Login
returns a page not found!
The strange thing is that both
http://localhost/myappname/
http://localhost/MYAPPNAME/
successfully return my welcome page, hence I can only think that the fault is somewhere within the CodeIgniter system itself, rather than my .htaccess ( which i've added below)
Its odd as well as I'm using a windows file system so my understanding is case should be completely interchangeable.
Has anyone experienced this problem before? Its a massive issue. to be honest i don't care if its EITHER uppercase or lower case, but that fact that i can get to my main page either way and only one of the instances actually works make is aweful.
I know there isn't much infomation here but if anyone can help..?
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(js|css|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
# If your default controller is something other than
# "welcome" you should probably change this
RewriteRule ^(Main(/index)?|index(\.php)?)/?$ / [L,R=301]
RewriteRule ^(.*)/index/?$ $1 [L,R=301]
# Removes trailing slashes (prevents SEO duplicate content issues)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]
<Files "index.php">
AcceptPathInfo On
</Files>