问题
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