F furfing New member Sep 12, 2008 607 3 0 N/A Apr 19, 2014 #1 Hello, let's say i purchase an expired domain with smth like X00 hundreds of subdomains. I'd like them all redirected to the home page even i dont know what they are. Is there any .httaccess rule that can make that ? Thx
Hello, let's say i purchase an expired domain with smth like X00 hundreds of subdomains. I'd like them all redirected to the home page even i dont know what they are. Is there any .httaccess rule that can make that ? Thx
AdamC ╠══════& Jun 10, 2012 1,410 18 0 Apr 20, 2014 #2 Code: RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301] This will direct any subdomain other than www to www., If you want them to go to the index only, remove the $1 from the 2nd line.
Code: RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301] This will direct any subdomain other than www to www., If you want them to go to the index only, remove the $1 from the 2nd line.
F furfing New member Sep 12, 2008 607 3 0 N/A Apr 20, 2014 #3 Dear Adam, Thx for this but maybe i didnt explain myself well. i'ld like things like : http://mine.google.com for example to be redirected to Google i have a website with hundred of sub domain http://xxx.mywebsite.com that needs to be redirected to the home page. cheers
Dear Adam, Thx for this but maybe i didnt explain myself well. i'ld like things like : http://mine.google.com for example to be redirected to Google i have a website with hundred of sub domain http://xxx.mywebsite.com that needs to be redirected to the home page. cheers
AdamC ╠══════& Jun 10, 2012 1,410 18 0 Apr 21, 2014 #4 I understood you fine, the code above still stands
S sam.hunt Member May 24, 2012 49 0 6 Above the Ground Oct 7, 2014 #5 Thanks bro i was also looking for something similar to this for one of my client.
Member8200 New member Jul 15, 2008 670 6 0 Oct 29, 2014 #6 AdamC said: Code: RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301] This will direct any subdomain other than www to www., If you want them to go to the index only, remove the $1 from the 2nd line. Click to expand... hi! thank you this, i might also need it.
AdamC said: Code: RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301] This will direct any subdomain other than www to www., If you want them to go to the index only, remove the $1 from the 2nd line. Click to expand... hi! thank you this, i might also need it.