[wp-hackers] rewrite base/cpt-slug/page-slug collisions?

David Law wp-hackers at google-adsense-templates.co.uk
Fri Jan 6 02:59:40 UTC 2012


On Thu, 5 Jan 2012 13:27:16 -0700, you wrote:

>hope i've explained this ok. and not even sure what happens when you do things like
>assign 'tag' as category base or 'type' as tag base (both are allowed in Settings).
>or if permalink structure /%category%/%postname%/ when both cat and post slugs
>match rewrite bases or CPT rewrite slugs.

I have a site where I set the Category base to tag before tags existed
in WordPress, when tags were added to WP they didn't work, threw up a
404. Had to set the Tag base to tags so I could use tags as well.
Tested on localhost and it's the same now.

I have to agree with OZ, WordPress can't account for every possible
poorly thought out structure a user might come up with like my example
above. If WordPress starts limiting what can and can't be used it will
limit WordPress.

I had an issue with a static page and a category with the same slug
(at least I think that was the issue)-

Following setup

Permalinks
Custom Structure = /%postname%.html
Category base = - (a hyphen)
Tag base = default setting

Standard .htaccess rules

Have a Category "Funny Jokes" - domain.com/-/funny-jokes/

Created a static page I'd been using as the front page "Funny Jokes"
so it loaded at domain.com/ with no issues.

Changed to archived front page and the static page loaded at
domain.com/funny-jokes redirects to domain.com/funny-jokes/ and is
blank.

I'm assuming the issue is related to the category since other static
pages load fine. Also the static page has comments and loading
domain.com/funny-jokes/comment-page-1#comment-12345 loads the page as
expected.

Thought it might be a bug, but couldn't replicate on localhost so
changed the slug of the static page from funny-jokes to
really-funny-jokes and it works, problem solved even though I didn't
figure out the exact cause.

David
-- 
http://www.stallion-theme.com/ Stallion WordPress SEO Theme
http://www.stallion-theme.com/stallion-wordpress-seo-plugin Stallion
WordPress SEO Plugin


More information about the wp-hackers mailing list