homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / WordPress
Forum Library, Charter, Moderators: lorax & rogerd

WordPress Forum

Help needed on wordpress duplicate URL issue

 9:47 am on Apr 7, 2013 (gmt 0)

Hi guy I had the issue a long time ago and I thought I solved it. But I didn't cos today I find the same issue.

I have a wordpress blog with url like this:

http://www.example.com/post-title-etc-.html, in some posts I have images like this <a href=http://www.example.com/heres-image-name.jpg><img src=http://www.example.com/heres-image-name.jpg></a> and everything was OK until one day I found Google indexed some pages (over 10) like this:

http://www.example.com/post-title-etc-.html/heres-image-name which only had a image with adsense ads without any content.

or http://www.example.com/post-title-etc-.html/
or http://www.example.com/page/11?updated-min=2010-01-01T00%253A00%253A00-08%253A00&updated-max=2011-01-01T00%253A00%253A00-08%253A00&max-results=9

I have no idea what happened, but apparently I got penalized in Panda. So anybody here please help me.



 9:49 am on Apr 7, 2013 (gmt 0)

Sorry I could not edit my post but the url are like http://www.example.com/post-title-etc.html


 4:35 pm on Apr 7, 2013 (gmt 0)

Does the link actually lead to a real resource? That looks like your permalinks are messed up. what is your permalink structure like and what plugins do you have installed?


 8:26 pm on Apr 7, 2013 (gmt 0)

The bandaid fix goes something like this

RewriteRule ^([^.]+\.html)/ http://www.example.com/$1 [R=301,L]

meaning "If there is a slash after the .html, redirect to form of URL that stops at .html". No closing anchor in the pattern, so there might be more stuff after the directory slash.

This is one of the many rules that you don't need to add unless you're actually getting requests for bogus URLs. Others include rules for intercepting multiple directory slashes, and rules for html files with attached query string (assuming you're not secretly parsing .html as .php).

Does the link actually lead to a real resource?

By default you can add any kind of garbage after html-- or any other extension used with static files-- and it will have no effect on the page.


 12:21 pm on Apr 8, 2013 (gmt 0)

garbage after html

True in most cases but I once came across a situation (a couple of plugins stepping on each other as I recall) that messed with the URL and generated 404s and 500s. Took me the longest time to figure out which ones were involved because the client had installed so many (20+).

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / WordPress
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved