Two domains including subdomains

Using a single web hosting account to host multiple sites

Two domains including subdomains

Postby AndersHH » Tue Jul 01, 2008 9:21 am

Hello. I would like to be able to use my two domains as follows:

Code: Select all
test.domain.eu ==> test.domain.dk
anothertest.domain.eu ==> anothertest.domain.dk
www.domain.eu ==> www.domain.dk
domain.eu ==> domain.dk


Wildcard DNS is in order and everything, I just need the mod_rewrite part


Can anyone help? :)

-AndersHH
AndersHH
 
Posts: 2
Joined: Tue Jul 01, 2008 9:17 am
Location: Denmark

Postby richardk » Tue Jul 01, 2008 3:50 pm

What is supposed to happen? A visible redirect?

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(.+\.)?example\.eu$ [NC]
RewriteRule ^(.*)$ http://%1example.dk/$1 [R=301,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby AndersHH » Wed Jul 02, 2008 2:02 am

Yes, thanks. That was exactly the solution I was looking for! :D


Thank you very much!

-AndersHH
AndersHH
 
Posts: 2
Joined: Tue Jul 01, 2008 9:17 am
Location: Denmark


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 16 guests

cron