Welcome Guest, Not a member yet? Register   Sign In
.htaccess and index.php problems
#1

[eluser]Unknown[/eluser]
My .htaccess file looks like:
Code:
RewriteEngine on
RewriteRule ^$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

If I go to http://macintosh.local/~James/ci/ then I get a 404 Error, "The requested URL /Users/James/Sites/ci/index.php was not found on this server." But if I type http://macintosh.local/~James/ci/index.php it works.

Same thing goes for http://macintosh.local/~James/ci/wiffle, I get a 404 that it can't find http://macintosh.local/~James/ci/index.php/wiffle but if I type that in it works.

I've set $config['index_page'] to "" and I've set up Mac OS X to actually use .htaccess files (done according to http://www.clagnut.com/blog/350/), which it apparently doesn't do by default. Yet it still won't work and I'm not sure why because if I put it up on my XMGFree account (XMGFree servers run Linux) it works.
#2

[eluser]esra[/eluser]
Try this:

Code:
Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
#3

[eluser]Unknown[/eluser]
It still won't work.
#4

[eluser]Unknown[/eluser]
Hi there.

@esra: thanks alot for your code. I've been searching this solution. It really worked like a charm.

Thanks again.




Theme © iAndrew 2016 - Forum software by © MyBB