admin管理员组文章数量:1415137
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.
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.
Share Improve this question asked Feb 14, 2017 at 5:30 erwstouterwstout 3022 silver badges9 bronze badges 1- 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 Commented Feb 14, 2017 at 13:17
2 Answers
Reset to default 0While not really a an answer when it comes to MAMP's problem on Windows. Installing WAMP and running WordPress there instead fixed this issue.
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>
本文标签: theme developmentSaving Permalinks Results in 403 MAMP (Windows)
版权声明:本文标题:theme development - Saving Permalinks Results in 403 MAMP (Windows) 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745226891a2648648.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论