Using MAMP Pro I have an offline/local EE site setup. An htaccess file is set up in the root of the local domain site with the standard remove index.php script implemented (as shown in the offical ExpressionEngine documentation).
I know the htaccess is being picked up because I can get a 500 server error page to execute if I put random code in in the file.
However if I put the official EE index.php removal code in the htaccess and go to local.sitename/sitepage I get the following error:
Not Found The requested URL /sitepage was not found on this server.
Just to confirm I have the following in the .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Removes index.php from ExpressionEngine URLs
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{REQUEST_URI} !/systemfoldername/.* [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
In terms of MAMP set up:
- I have Mamp Pro installed with Set ports Apache and MySQL to 80,443 and 3306.
- A local custom domain set up via HOSTS panel ' ie. local.sitename '.
- Under HOSTS > Extended TAB > 'Options All'. is selected to include all options.
- PHP Version set to Default: (5.5.26) for local domain.
In terms of EE Control Panel:
- 'index.php' is removed from: Admin > General Configuration > Name of your site's index page (field).
In terms of htaccess variations of I have tried:
- Removing
<IfModule mod_rewrite.c>
tag pair. - Adding a local path for RewriteBase / (ie. RewriteBase /username/sites/sitename/ etc).
- Removing the slash '/' from before index.php on line:
RewriteRule ^(.*)$ /index.php/$1 [L]