domain.tld to www.domain.tld but keeping other subdomains.

Using a single web hosting account to host multiple sites

domain.tld to www.domain.tld but keeping other subdomains.

Postby Smuda » Tue Apr 26, 2005 5:25 am

ok problem,

i want http://domain.tld to redirect to http://www.domain.tld
BUT i also want to keep the subdomains like http://sub.domain.tld on the same account. and due the fact that i have 1000+ subdomains i don't want o add them all to the .htaccess file.

anybody have an idea on how to do that?
Smuda
 

Postby Guest » Thu Apr 28, 2005 3:23 am

no one? :(
Guest
 

Postby Caterham » Thu Apr 28, 2005 4:32 am

no one?
This is not instant messaging ...
this has been answerd already sometimes here
Code: Select all
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule ^(.*) http://www.example.com/$1 [R=301,L]
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm

Postby Guest » Sat Apr 30, 2005 11:01 am

but this does also redirect whatever.domain.tld to the www domain.
Guest
 

Postby Caterham » Sun May 01, 2005 6:08 am

but this does also redirect whatever.domain.tld to the www domain.
no.

only if the host starts with example.com and this is not the case for whatever.example.com
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 88 guests

cron