Permalink Custom Structure creates an odd url
-
Hi,
I am using a custom theme. I am having Permalink Custom Structure:
/%category%/%postname%/
This permalink structure creates a page as phppot.com/php/ actually this should go to page not found.
Here ‘php’ is category-name. So, a valid category page is
/category/php/
I checked with a temporary fresh WordPress install with 2024 theme. Then used the same permalink and the same behavior happens.
Question: Why does WordPress create a page like this phppot.com/[category-name]/ – This URL gets mapped to archive.php
The problem:
phppot.com/[category-name]/ and phppot.com/category/[category-name]/ are duplicate pages.
There are no pagination for this odd url.I checked a popular blog and see that they have redirected domain/[category-name]/ to domain/category/[category-name]/
Kindly let me know why this URL phppot.com/[category-name]/ is working. Actually it should give page not found.
Solution: Shall I do a .htaccess based redirect for all my categories one by one? or is there a better solution to fix this?Thanks for your help in advance.
The page I need help with: [log in to see the link]
- The topic ‘Permalink Custom Structure creates an odd url’ is closed to new replies.