Removing index.php on MAMP

Posted by djeetee on Stack Overflow See other posts from Stack Overflow or by djeetee
Published on 2011-01-16T07:16:21Z Indexed on 2011/01/16 13:53 UTC
Read the original article Hit count: 142

Filed under:
|
|

this questions was asked before and has had many responses. The problem is nothing i tried worked.

Background: i use MAMP and all of my web project are located under WebProjects which I relocated out of its standard location within the MAMP folder in Applications. so my structure is something like this:

Documents/WebProjects/GreatSite/Application/...

What happened so far: my understanding is that removing index.php can be done either through httpd.conf or .htaccess. anytime i touched httpd.conf, Apache refuses to start. I tried various edits to .htaccess including the one in codeigniter.com/wiki/mod-rewrite and the last one from a post on SO which is this:

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

this give me the following error when i access the site:

An Error Was Encountered
Unable to determine what should be displayed. A default route has not been specified in the routing file.

I have updated config.php to have $config['index_page'] = ''; and i have placed the .htaccess file in the GreatSite folder.

One other note, my CI system folder is up a level from GreatSite. Not sure if this has any impact. also, apache has the module loaded.

so, I'm hoping someone has successfully done this on MAMP and could provide direction specifically around the content of their .htaccess (or even httpd.conf), it's location and any other mods they had to make to get this going.

thanks

© Stack Overflow or respective owner

Related posts about mod-rewrite

Related posts about codeigniter