最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Fix 404 error after changing permalink structure

programmeradmin2浏览0评论

hope you are all doing good!

I have this problem. I had set "Post Name" as the URL scheme, therefore, I get www.site/article-title for blog entries. I've written a few test posts and I realize I want permalinks to look like this:

For blog posts: www.site/blog/article-title. For categories: www.sitee/blog/category/category-name. For tags: www.site/blog/tag/tag-name

So I made the following changes in the permalink settings page:

And now I get the error 404 when I access a post or a page. What can I do in order to fix the problem? Thanks in advance! :D

PD. Sorry if my English sounds odd, Spanish is my native language.

hope you are all doing good!

I have this problem. I had set "Post Name" as the URL scheme, therefore, I get www.site/article-title for blog entries. I've written a few test posts and I realize I want permalinks to look like this:

For blog posts: www.site/blog/article-title. For categories: www.sitee/blog/category/category-name. For tags: www.site/blog/tag/tag-name

So I made the following changes in the permalink settings page:

And now I get the error 404 when I access a post or a page. What can I do in order to fix the problem? Thanks in advance! :D

PD. Sorry if my English sounds odd, Spanish is my native language.

Share Improve this question edited Jan 19, 2019 at 10:52 Glorfindel 6093 gold badges10 silver badges18 bronze badges asked Oct 7, 2014 at 17:54 user60184user60184 3
  • Do the new posts you add work? Have you tried saving the permalinks again? You can go to settings > permalinks and hit save. This might fix it – Fraggy Commented Oct 7, 2014 at 20:50
  • @Fraggy Yeah, I had tried that. It was a .htaccess file issue . This link helped me to fix the problem: codex.wordpress/… – user60184 Commented Oct 8, 2014 at 15:42
  • I solved this issue by this way – Shamsheer AT Commented Apr 25, 2020 at 16:12
Add a comment  | 

1 Answer 1

Reset to default 1

If your .htaccess file were writable, wordpress do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file.

1- Open .htaccess file and copy following data in that file.

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

2.After update file permalink issue will resolve.

发布评论

评论列表(0)

  1. 暂无评论