ss_blog_claim=4079d6def1eb3506940afc491a88a95f

Directory redirect in .htaccess

Scripts Add comments

I’ve been using Google Webmaster tools to keep an eye on a few of my site statistics. It shows 404 errors, robots.txt problems, and other things that Google comes across that users might be hitting also. I have been using my .htaccess file to repair some of the problems. Unfortunately part of the Registerfly/Enom issues seems to have created a dynamic problem. While the site was down a placeholder page was shown and somehow Google is being directed to pages on zieak.com that do not exist as a result.

404 error pages

What i think is happening is that the placeholder pages for “expired” domains redirect to each other to try and increase page rank for items that consumers look for online. Eventually they point to a site that the registrar makes money off of. Fortunately zieak.com is no longer part of that network but for some reason Google is finding links to these ghost pages.

I had manually entered permanent redirect instructions on my .htaccess file like for each page that was showing as not found.

Redirect 301 /get/christening/favor/gifts/gifts.htm http://www.zieak.com

Unfortunately, my site currently has almost 100 of these www.zieak.com/get/bla/bla/bla.htm pages in the list of pages not found. Copying and pasting them in was becoming tedious. I finally found the solution to my problem in this thread about using a wildcard for a redirect in your .htaccess file. So now i can redirect Google (or any other bot or human) to my main page instead of a file not found notice.

RedirectMatch 301 ^/get/ http://www.zieak.com

It seems that all of the problems coming in are for /get/ and /buy/ directories on my site. I’ll just be sure to never structure my directories to use those folders.



Related Posts

One Response to “Directory redirect in .htaccess”

  1. John John Says:

    Many thanks for posting this.

    I spent an hour before finding your post and it was just what I was looking for.

    I appreciate that!

    John

Leave a Reply

Entries RSS Comments RSS Log in