[英]Wordpress permalink is not working when set to postname
I have problem with my WordPress permalink. 我的WordPress固定链接有问题。 I'm running a WAMP server. 我正在运行WAMP服务器。 I tried to change the permalink to postname: "/%postname%/"
. 我试图将永久链接更改为postname: "/%postname%/"
。
When I test one of my pages I get an 404 Not Found. 当我测试我的页面之一时,我得到404 Not Found。
How can I fix this problem? 我该如何解决这个问题?
Looks like your .htaccess doesn't exists or better said the mod_rewrite isn't working. 看来您的.htaccess不存在,或者最好是说mod_rewrite无法正常工作。
My guess though, since you are using wamp, is that the .htaccess was created by wordpress. 但是,由于您使用的是wamp,我的猜测是.htaccess是由wordpress创建的。 Just check if the file exists otherwise create it. 只需检查文件是否存在,否则创建它。
Please read the appropriate documentation . 请阅读相应的文档 。 In short, you should put a file named .htaccess
in your root directory and have the following in the file: 简而言之,您应该在根目录中放置一个名为.htaccess
的文件,并在文件中包含以下内容:
# 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.