wickedguy
Supreme Member
- Jul 22, 2009
- 1,407
- 1,388
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!!
Here's the example code:
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!!
Here's the example code:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^(/)?$ http://homepageofmybackupdomaindotcom [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^smallsitesubfolder/(.*) http://mybackupdomaindotcom/mainsubfolder/$1 [L,R=301]