简体   繁体   中英

Wordpress permalink is not working when set to postname

I have problem with my WordPress permalink. I'm running a WAMP server. I tried to change the permalink to postname: "/%postname%/" .

固定链接设置。

When I test one of my pages I get an 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.

My guess though, since you are using wamp, is that the .htaccess was created by 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:

# 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM