samedi 18 avril 2015

Wordpress - URL's containing numbers cause problems

I've noted that when I use the permalink structure of %category%/%postname% any category slug or post slug containing a numeric value causes the browser to auto-populate the forward browse button with incremental non-existent versions of the URL all the way to infinity.


Example 1:


URL: http://ift.tt/1Q1dFB0


Right clicking on browser forward button shows:


http://ift.tt/1Oqj4xQ


http://ift.tt/1Q1dDZE


http://ift.tt/1Oqj4xS etc etc etc to infinity


Example 2:


URL: http://ift.tt/1Q1dDZG


Right clicking on browser forward button shows:


http://ift.tt/1Oqj54J


http://ift.tt/1Q1dDZK


http://ift.tt/1Oqj54L etc etc etc to infinity


I've also noticed that I can't target url's that fall foul of this in my htaccess.


This occurs:



  1. On any blank wordpress install with no plugins, etc, just permalinks enabled.

  2. With or without code in place in the single.php file. I've deleted my code in full to leave the file empty, and it still happens.


My .htaccess is as follows just in case that helps:



Options +FollowSymlinks

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://ift.tt/VAk5HC [R=301,L]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress


I suspect this is happening for all of you, but I'm hoping one or two of you have figured out how to get around it. I think it's possible to do with Wordpress attempting to self manage multipage articles, which is something I do not use on this site, and would be happy to do away with, if that is even possible.


Thanks for any assistance offered.


Aucun commentaire:

Enregistrer un commentaire