0

I am trying to setup a local environment on my Windows 10 machine (to knock out some overtime) but keep running into a problem. Let me start with my environment workflow on Mac OSX... I have developed many sites locally over the years using MAMP Pro, allowing me to have a host for each project. However, at home I have just recently switched to the Windows environment. I downloaded MAMP Pro for Windows (which is identical at least in UI) and setup everything. I worked for a bit just fine, but didn't notice until now, that if you try to go to any other page but the home page, I get a 403 Forbidden Error. I can even kick start this error by saving permalinks (renders the entire host/site as a 403, nothing works.)

The only way I can get the site to appear again is to remove everything from the .htaccess file. Then I have the homepage again (admin works fine) but thats it. When I save permalinks this is what it produces in the .htaccess file:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

I feel like my question might be kind of broad, but what could the issue be here? Is it permissions? I feel pretty well versed in in servers/unix/permissions but throwing Windows into the picture gets me hung up. I'm also using Cmder for a command line tool.

  • this sounds like mod_rewrite is not enabled, although not sure why would you get a 403 in that case but maybe it is a mamp thing – Mark Kaplun Feb 14 '17 at 13:17
0

While not really a an answer when it comes to MAMP's problem on Windows. Installing WAMP and running WordPress there instead fixed this issue.

-2

You have to add your project directory name into RewriteBase and RewriteRule.

For Example:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
  • I'm not sure this is the case. It lives in the project lives in the root directory, being / since its a virtual host. – erwstout Feb 14 '17 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.