0

I have two folders in application for dev/ and live/ sharing the same system. This is a fresh install. How do I remove the index.php in the url via htaccess? I've tried the provided code:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

However, nothing seems to change. How do I adjust the htaccess to remove the index.php from the url path.

Thanks!

jaysonp
  • 261
  • 1
  • 3
  • 4

1 Answers1

0

If your installation is not at the root of the domain, you should remove the / before index.php:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
Joseph Silber
  • 214,931
  • 59
  • 362
  • 292
  • Unfortunately, no go. I have a virtual host setup using MAMP so I can hit the project at ci/ in the browser. I created a page called profile. I can hit ci/index.php/profile, but I get a 404 at ci/profile. – jaysonp Sep 09 '11 at 22:41
  • @jaysonp - Did you put the `.htaccess` file inside youe `ci` folder? – Joseph Silber Sep 11 '11 at 05:28