Few domains and one physical host.

Using a single web hosting account to host multiple sites

Few domains and one physical host.

Postby KPaul » Sun Nov 04, 2007 1:40 pm

Hello, I have one big problem with my new host provider.
For two weeks I'm trying to write htaccess file that will mask my physical address of the site.

The problem is that I have 4 .com and 4 .de domains all of them goes to the same site. They domain provider and host provider are different.

I want to configure my .htaccess files that if someone will type in the address bar one of them the domain name will be as a typed name.

Example: Main site is on this address: alpha.com

beta.com and gamma.de are my domains that should point to the same site as alpha.com WITH THE TYPED ADDRESS IN THE ADDRESS BAR.

So if someone have typed beta.com he should be redirect to alpha.com with the beta.com in address bar.

Is this possible??

The people from my new Host - God help me;-) have said that the only possible way is to redirect my site in frames. :o
KPaul
 
Posts: 7
Joined: Sun Nov 04, 2007 1:22 pm

Postby richardk » Sun Nov 04, 2007 2:07 pm

What happens when you go to beta.com at the moment? If it redirects, what is causing it?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby KPaul » Sun Nov 04, 2007 3:01 pm

Till now I have on my domain simple index.php file with frame:

Domain beta.com

<html>
<head>
<frameset>
<frame src=" http:///alpha.com">
</frameset>
</head>
</html>

I want to redirect beta.com to alpha but there should be the typed address in the address bar.

And for now this solution with frames is the only that work. There must be better way with htaccess. The solution with frames is very "unwanted" when we talk about optimizations.
KPaul
 
Posts: 7
Joined: Sun Nov 04, 2007 1:22 pm

Postby richardk » Sun Nov 04, 2007 3:14 pm

So the domains have different document roots on the same server? What are they?

You can try the following in a .htaccess file in each of them except alpha.com
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule .* http://www.alpha.com%{REQUEST_URI} [P,L]

It require mod_proxy and mod_rewrite.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby KPaul » Sun Nov 04, 2007 3:49 pm

Thanks for this code but it don't think so that my provider uses mod_proxy. Mod_rewrite is on.

This code:

Options +FollowSymLinks
RewriteEngine On
RewriteRule .* http://www.alpha.com%{REQUEST_URI} [P,L]

doesn't work but this:

Options +FollowSymLinks
RewriteEngine On
RewriteRule .* http://www.alpha.com%{REQUEST_URI} [R,L]

only redirect to this site with http://www.alpha.com in address bar.

Is there any other way.
KPaul
 
Posts: 7
Joined: Sun Nov 04, 2007 1:22 pm

Postby richardk » Sun Nov 04, 2007 3:59 pm

Is there any other way.

Probably not with mod_rewrite.

Do the domains go to the same server?
What are the document roots of the domains?

You ask your host if they can create Symbolic Links from the other domains' document roots to the main domain's document root.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby KPaul » Sun Nov 04, 2007 4:13 pm

Do the domains go to the same server?


Yes all this 8 domains go to the same server.

What are the document roots of the domains?


Document roots ? - ??

Ok and maybe there is other way to do this.

Redirect to the root server and there putted a htaccess file that will only mask the adress to the typed. Maybe this is stupid I don't know.

But nevermind thank you a lot.
KPaul
 
Posts: 7
Joined: Sun Nov 04, 2007 1:22 pm

Postby richardk » Mon Nov 05, 2007 12:18 pm

Document roots ? - ??

A doucment root is the directory on the server the domain goes to, eg. /home/your-username/public_html.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 26 guests

cron