Reputation: 38
i've website built with CODEIGNITER working perfect on my local server but when i uploaded it on live it give me error 404 and after updating .htaccess with following code now its giving me 500 error
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /home/index.php?$1 [L]
any solutions...
Upvotes: 0
Views: 4840
Reputation: 2094
this works for me
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
in config.php
$config['index_page'] = '';
and
$config['uri_protocol'] = 'AUTO';
hope it help
Upvotes: 1
Reputation: 10878
This is an .htaccess
rule so specify your RewriteBase
as the manual says (you've read this of course). That's
RewriteBase /
for a DOCROOT/.htaccess
and if your Codeigniter catachall script, index.php
is in DOCROOT as well then the rule should be:
RewriteRule ^(.*)$ index.php/$1 [L]
Upvotes: 2