20e5d936bdb04eb38b1d0711c2df5c4c_small Josh Rubinstein 7 posts

Ryan,

I am trying to remove the index.php from my url strings as you have on the screencasts. I am running EE locally with MAMP. I have the folder containing the EE install inside my htdocs folder.

I have placed the .htaccess file inside the folder holding the EE install with the same rules you used but for the life of me I can not get anything but the site index page to load without the index.php in the url. BTW I have also taken the index.php out of the admin page for general configuration. If I take out the index.php out of my url:
http://localhost/insidethefold_ee/index.php/about
I get the following page error:

Not Found
The requested URL /index.php/about was not found on this server.
Apache/2.0.59 (Unix) PHP/5.2.5 DAV/2 Server at localhost Port 80

My htaccess file reads:


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

Any Ideas? I have posted to EE forums a lot and I have had no great help there. I think people are tired of me asking this question. Does MAMP have a special consideration with this htaccess file?

Josh

 
Ryanirelan_headshot_48x48_small Ryan Irelan 87 posts

Hi Josh,

First, I’m sorry it’s taken me so long to respond. I didn’t see your post come through my RSS feed.

It looks like your site is running in a subdirectory, so you probably need to remove the preceding forward slash from the last RewriteRule. Like this:

RewriteRule ^(.*)$ index.php/$1 [L]
 
20e5d936bdb04eb38b1d0711c2df5c4c_small Josh Rubinstein 7 posts

Ryan,

That’s it! Thank you for this simple suggestion. I will be sure to try and help out the next person who gets stuck on something like this. I was chasing my tail:)

I really do appreciate you taking the time to answer my questions.

Regards,
Josh

3 posts, 2 voices