Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am getting a lot of errors in Webmaster Tools and basically there's a lot of links ending like this: mydomainname.com/links.php

How can I redirect these links, to shave off this part at the end? For instance, there is a link in Google:

http://www.onlineglobalbiz.com/article-marketing/www.onlineglobalbiz.com/links.php

This should be:

http://www.onlineglobalbiz.com/article-marketing/

Using .htaccess, how can I redirect from the incorrect links?

share|improve this question
add comment

migrated from superuser.com Mar 14 '11 at 17:07

This question came from our site for computer enthusiasts and power users.

1 Answer

The odds are you have lots of HTML errors in your website for those kind of errors to be showing up. You need to fix them, not put a band aid on them. Crawl your site with a tool like Xenu's Link Sleuth and look for where those bad links are and fix them. That will solve your problem with Google and let your users actual find your content as they probably are having a poor user experience right now.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.