Rewrited url for page just points to index

扶醉桌前 提交于 2019-12-24 14:18:28

问题


The problem I am facing is as follow:

I created a new page in Wordpress with a url rewrite '/foo/'. Probably I hit something (just configured things in the Admin panel not in the database!) an now /foo/ just points to my index and doesn't point to the given page (anymore!). If I just change '/foo/' to something like this '/foo-1/' it works perfectly.

I think it's to hard figure it out what goes wrong but maybe someone has a good suggestion or knows which data I need to remove from the database!

Thanks in advance,

Nick


回答1:


Whenever you are fiddling with URL rewrites ( especially with new custom_post_types and taxonomies, but basically everywhere ) it is very important not to forget flush_rewrite_rules(); which basically take care of flushing the WP rewrite rules ( like it's name ) - thus allowing you to declare new ones without a conflict.



来源:https://stackoverflow.com/questions/20525607/rewrited-url-for-page-just-points-to-index

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!