category/postname permalinks work even when category name is not a category!
-
I am using the following permalink structure on my wordpress 2.8 blog:
/%category%/%postname%
so that my urls look like:
domainname.com/categoryname/post-slug
What’s weird is that this permalink structure will allow me to replace categoryname with ANY word I want and it still works! For instance, I can change the above example to the following and it will still load the right post:
domainname.com/whatever/post-slug, or
domainname.com/whatever/whatever/post-slug, or
domainname.com/whatever/whatever/whatever/post-slugYou get the picture. I don’t think this is a good thing. Ideally, the above three URLs should lead to 404 pages, but they don’t.
My htaccess file has the following in it:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>Also, if I have my Reading settings set to show only 5 posts per page, the above permalink structure causes a 404 error when I click the “Older Entries” link to see the next 5 posts. For example:
domainname.com/categoryname/page/2
leads to a 404 error, yet,
domainname.com/page/2
works just fine. So, it means that I have to set my READING settings to show all my posts on one long scrolling page. Not good!
- The topic ‘category/postname permalinks work even when category name is not a category!’ is closed to new replies.