CodeIgniter Forums
Mod Rewrite / 500 internal error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Mod Rewrite / 500 internal error (/thread-31691.html)



Mod Rewrite / 500 internal error - El Forum - 06-28-2010

[eluser]Unknown[/eluser]
Hi,

I'm trying to remove the index.php from my url.
Here's my .htacess file.

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

I have change my config.php

$config['index_page'] = "";

And i'm getting an 500 error.

---------------------------------------------

If i change my .htacess rule with a redirection at the end it work fine!

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [R]

But this is not the result i'm looking for....

Any idea why i'm getting this error?


Mod Rewrite / 500 internal error - El Forum - 06-28-2010

[eluser]Unknown[/eluser]
I have remove the slash after the index.php in the RewriteRule and it work fine.

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

Any idea why this slash create the 500 error?