I've made a big mistake with my wordpress blog: The url to an article is set to be: http//blog.com/subject-id.html Since I've seen that url like index.php/2/ are getting indexed, I've asumed that google will index my long articles "subject-id.html/2/" Boy, I was wrong! Now I need to remove the ".html" part, which is easy in wordpress, BUT I want to make a "moved permanently" redirect also. Anybody has a solution to this problem?
Ouch!!!!! I'm not sure if it's possible, since there is the original URL plus two different fake URLs. You might get the infinite loop. Post three URL examples. Original URL, current URL, and how you want it. How long have you given Google to index the pages and how old is the site?
I've did it! I've changed the urls. I've got about 600 posts in 4 months, a few external links pointing to posts (that will get a 404 error now). About 50 posts have 2-5 pages, they are the 1st reason I've decided to change the urls. 80% of my 400 visitors/day come from SERP to internal pages mostly, I guess traffic will be down for a few days, just have to wait...
Do you have an original 301 redirect? I tested it out early today, and it is possible to have a redirect to a new URL after changing a mod_rewrite URL. Post a URL in all three formats, original php URL, first mod_rewrite URL, and current URL.
Here is a part from the old .htaccess: RewriteRule ^([^/]+)-([0-9]+).html/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?name=$1&p=$2&feed=$3 [QSA,L] RewriteRule ^([^/]+)-([0-9]+).html/(feed|rdf|rss|rss2|atom)/?$ /index.php?name=$1&p=$2&feed=$3 [QSA,L] RewriteRule ^([^/]+)-([0-9]+).html/page/?([0-9]{1,})/?$ /index.php?name=$1&p=$2&paged=$3 [QSA,L] RewriteRule ^([^/]+)-([0-9]+).html(/[0-9]+)?/?$ /index.php?name=$1&p=$2&page=$3 [QSA,L] and same part from the new .htaccess: RewriteRule ^([^/]+)-([0-9]+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?name=$1&p=$2&feed=$3 [QSA,L] RewriteRule ^([^/]+)-([0-9]+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?name=$1&p=$2&feed=$3 [QSA,L] RewriteRule ^([^/]+)-([0-9]+)/page/?([0-9]{1,})/?$ /index.php?name=$1&p=$2&paged=$3 [QSA,L] RewriteRule ^([^/]+)-([0-9]+)(/[0-9]+)?/?$ /index.php?name=$1&p=$2&page=$3 [QSA,L] Do you think it is possible, at least, to redirect visitors who get now a 404 from "/article-123.html" to index or, even better, to "article-123/"?
Thanks, I really apreciate your help. Now there is a problem: I got a page like http://bacau.ido.ro/ziarul-de-bacau-382/ When I try the old page: bacau.ido.ro/ziarul-de-bacau-382.html It redirects me to: bacau.ido.ro/ziarul-de-bacau-382?/%3f What to change here: RewriteRule ^([^/]+)\-([0-9]+)\.html(/[0-9]+)?/?$ /$1-$2$3?/? [R=301,L] to just redirect "-382.html" to "-382/" ? I do not need that urls like "stuff-382.html/page/2/" or "stuff-382.html/2/" to make a redirect since google didn't crawl any of this urls. Tkanks. Update: I've changed RewriteRule ^([^/]+)\-([0-9]+)\.html(/[0-9]+)?/?$ /$1-$2$3?/? [R=301,L] with RewriteRule ^([^/]+)\-([0-9]+)\.html(/[0-9]+)?/?$ /$1-$2$3/ [R=301,L] and the redirect url looks ok. Do you think it's the right move?