Possible Duplicate:
CodeIgniter - How to hide index.php from the URL
How can I remove index.php
from the URL using .htaccess
so when user types in, for example:
it will become :
Currently
With my current .htaccess
, both of the urls above will be able to access the controller welcome
, but I would like only 1 valid url for the controller.
RewriteEngine on
RewriteCond $1 !^(index\.php|admin_assets|img|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1