New*_*ser 3 wordpress .htaccess
我试图用permalink feature的WordPress我localhost,所以我刚才复制这是代码generated by WordPress,当我点击post name from Common Settings。我保存在我的本地生成的代码在wordpress index.php文件存储在的名称.htaccess,现在当我要访问的页面,地址栏的browser is showing the full address of the post,但post can not be seen on the browser。只有404 Not Found error is comming。有人可以告诉我这里错了什么吗?
您应该让wordpress为您的本地主机服务器写入此文件。
您不能简单地.htaccess从另一台服务器复制并期望它可以正常工作,而必须对其进行修改以反映您的服务器配置。
您应该修改RewriteBase和最后一个RewriteRule,例如http://localhost/wordpress:
<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>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8835 次 |
| 最近记录: |