domain alias

Using a single web hosting account to host multiple sites

domain alias

Postby mikesamar » Thu Oct 04, 2007 8:34 am

The question shall be asked multiple time but I can find a googd answer.

I've two domains reumer.net and reumer.eu and I want to send reumer.eu to reumer.net with maintaining the url reumer.eu instead of a redirect.
Is that possible with .htaccess?

I currently use as .htaccess:

Options +FollowSymLinks

RewriteEngine On

# If it's not the main domain.
RewriteCond %{HTTP_HOST} !^www\.reumer\.net$ [NC]
# Redirect to the document root.
#RewriteRule ^(.*)$ http://www.reumer.net/$1 [R=301,L]

Thank you very much for your answer.

Regards Mike
mikesamar
 
Posts: 5
Joined: Thu Oct 04, 2007 8:30 am

Postby richardk » Thu Oct 04, 2007 1:39 pm

Do both domains go to the same server and document root? If yes, then try removing the mod_rewrite, clearing your browser's cache and trying it.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby mikesamar » Fri Oct 05, 2007 7:29 am

The domains have their own document root, but on the same server /directory tree!

They were one document root, but let me explain my wish further that the subdomein tech.reumer.eu has to be redirect to tech.reumer.net.
The hosting provider advised me to have seperate document root to make subdomains work.

The redirect works for www.reumer.eu but I want to have www.reumer.eu als url instead of after redirection www.reumer.net.
Is this possible?

Thanks Mike
mikesamar
 
Posts: 5
Joined: Thu Oct 04, 2007 8:30 am

Postby richardk » Fri Oct 05, 2007 12:17 pm

So you want to change .eu to .net on all your sub domains and the main domain? Then using the same document root would seem like the way to go, what's wrong with sub domains when they have the same document root?

You could ask them if they could create a Symbolic Link from the .eu document root to the .net document root.

Otherwise, you will need mod_proxy and mod_rewrite, in a .htaccess file in the .eu document root
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(.+\.)eu$ [NC]
RewriteRule .* http://%1net%{REQUEST_URI} [P,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby mikesamar » Sat Oct 06, 2007 9:57 am

Richard, thank you.

The domains has two different document roots now.

I'll ask for a symbolic link in my document root of eu domain to .net document root and I hope they will accept it.

Your example doesn't work. I now get a "file not found" 404 error.
Is the %1net maybe wrong?
How can i see of mod_proxy is installed on apache?

How can I see the generated url?

Mike
mikesamar
 
Posts: 5
Joined: Thu Oct 04, 2007 8:30 am

Postby richardk » Sat Oct 06, 2007 12:06 pm

I'll ask for a symbolic link in my document root of eu domain to .net document root and I hope they will accept it.

I don't see any reason for them to mind.

Your example doesn't work. I now get a "file not found" 404 error.

For what URL? You probably don't have mod_proxy.

Is the %1net maybe wrong?

No.

How can i see of mod_proxy is installed on apache?

You'd have to ask your host.

How can I see the generated url?

Replace P with R and it will be redirected.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby mikesamar » Sat Oct 06, 2007 12:50 pm

Thank you very much Richard.

I'll call the hosting provider an dhope they can help me.

Mike
mikesamar
 
Posts: 5
Joined: Thu Oct 04, 2007 8:30 am

Postby mikesamar » Mon Oct 15, 2007 7:39 am

Richard,

The hosting provider has helped me with a symbolic link!
I had to adjust Joomla too so that the url's on the pages are pointing to the correct url.

Now it works like i wanted it.

Thank you again for the support.

Cheers Mike
mikesamar
 
Posts: 5
Joined: Thu Oct 04, 2007 8:30 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 22 guests

cron