Redirect All Subdomains to Main site?

Ask your mod_rewrite and Redirection questions here, and get answers!

Redirect All Subdomains to Main site?

Postby ghadamyari » 26 Aug 2008 14:35

Hi there,

Could I redirect All subdomains to my main site?

such as : mmmd.example.com , dasdasdas.example.com , asdasda.example.com ?

I need it JUST FOR .htaccess file

Thanks !
ghadamyari
 
Posts: 1
Joined: 26 Aug 2008 14:26

Re: Redirect All Subdomains to Main site?

Postby handsofaten » 17 Sep 2008 03:49

i think it would look like this:

Code: Select all
RewriteCond %{HTTP_HOST} ^(.*)\.yoursite\.com$ [NC]
RewriteRule ^(.*)$ http://yoursite.com
handsofaten
 
Posts: 1
Joined: 17 Sep 2008 02:30


Return to Redirect or Rewrite Questions



Who is online

Users browsing this forum: clerkfurniture, HIBcokyacrornsap, ShakhtarrDon, VocrepeAcceby, Zitioutbava