1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How htaccess can save your BUTT!

Discussion in 'White Hat SEO' started by wickedguy, Oct 21, 2010.

  1. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    Well, it all started here: http://www.blackhatworld.com/blackh...s/241969-get-your-site-indexed-1-hr-flat.html

    Read that thread, I'm NOT going to repeat it here!

    Anyway, in short, my host deleted all my domains by accident.

    And I was loosing money (still am)! F*

    Now what I did, setup some of those domains on another server and changed DNS. On those domains are NO CONTENT! Anyways, traffic are still coming to those domains and if I don't do something real quick, I'm loosing out here if you know what I mean.

    In any case, the basic structure of my sites are all the same except for the main sub-folder names. And this is where htaccess is now saving my ass in a BIG way!

    Ok I have a kinda BIG site with lot's of content. Then I have smaller sites with less, but basically the same content!

    So what the htaccess does is when someone visits one of the empty domains, it redirects to the file on my main domain. If that file does not exist, then my main domain redirects to the error page.

    In the meanwhile, I start updating the smaller domains with fresh and old content. So, if a traffic comes to the sites by clicking a link in a search engine, the htaccess checks if that file exist, and if it exists, then the trafic stays at that site.

    If it does not exist, the traffic is then redirected to the main domain cause maybe that file is there!

    Ok, I'm gonna add the code for the htaccess here, maybe it can be of help to our members.

    What I've learnt from this is that all the pages created on all my smaller sites, will from now on also be created on one single domain hosted somewhere else. In the event that the same thing happen again, I will just DNS the other domains and upload my magic formula, which is of course my htaccess! VIOLA!! :D

    Here's the example code:
     
    • Thanks Thanks x 3
  2. Fireboltgirl

    Fireboltgirl Regular Member

    Joined:
    Dec 26, 2009
    Messages:
    237
    Likes Received:
    120
    Occupation:
    This is a job?
    Location:
    In the light :)
    A lesson for all of us who put in the hours and take this shit for granted. Hope your
    sites are up and running soon. I use the site in your sig so it nearly gave me a heart
    attack to see you post that you'd lost your sites.
     
  3. The_1

    The_1 Newbie

    Joined:
    Jan 19, 2011
    Messages:
    23
    Likes Received:
    3
    I don't quite understand...

    You .HTACCESS file redirects traffic that comes to empty domains to mybackupdomaindotcom/mainsubfolder/ depending on what subdomains and posts traffic hits?

    For example:

    Traffic came to dogtraining/emptydomaindotcom/dog-training/

    Then it would be redirected to mybackupdomaindotcom/dogtraining/dog-training/

    ???