Content from a different domain

Using a single web hosting account to host multiple sites

rewrite subdomain

Postby grzx » Tue Aug 18, 2009 4:19 pm

Hi
I have a domain name example.com redirecting to abc.domain.com for the web content. But I need to hide abc.domain.com, so in the browser it will only appear example.com, not abc.domain.com anymore.
Can you please help?
grzx
 
Posts: 4
Joined: Tue Aug 18, 2009 4:11 pm

Postby richardk » Tue Aug 18, 2009 4:30 pm

Is the other domain on a different server?

If they are, you will need mod_proxy, try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule .* http://abc.example.com%{REQUEST_URI} [R=301,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby grzx » Wed Aug 19, 2009 6:19 pm

Really appreciate your reply...

They all are in the same server.
There are actually 3 websites.
1. domain.com
2. examplea.domain.com
3. exampleb.domain.com

I also have domain name examplea.com and exampleb.com which are redirected to examplea.domain.com and exampleb.domain.com respectively.

But I need to hide the subdomain names - so instead of having examplea.domain.com, it will show examplea.com only. The same case as exampleb.domain.com.

Thanks.
grzx
 
Posts: 4
Joined: Tue Aug 18, 2009 4:11 pm

Postby richardk » Fri Aug 21, 2009 5:47 am

They all are in the same server.
There are actually 3 websites.
1. domain.com
2. examplea.domain.com
3. exampleb.domain.com

What are their document roots?

I also have domain name examplea.com and exampleb.com which are redirected to examplea.domain.com and exampleb.domain.com respectively.

What is causing the redirect?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby grzx » Sat Aug 22, 2009 5:10 am

Hi

These 3 website are not related. They are all hosted using one hosting and 3 domain names. The reason is the owner wanted to cut cost.

So the documents roots are respectively in
1. domain.com
2. examplea.domain.com
3. exampleb.domain.com

The domain names we have respectively are
1. domain.com
2. examplea.com
3. exampleb.com

examplea.com is redirected to examplea.domain.com
exampleb.com is redirected to exampleb.domain.com.

What I need to do is to hide the subdomain urls. So instead of examplea.domain.com, in the browser the url will stay examplea.com.
The same case is with examplea.domain.com. The browser needs to stay exampleb.com.


I'm so sorry if I confuse you. Do I make myself clear now?

Thanks a lot for helping.
grzx
 
Posts: 4
Joined: Tue Aug 18, 2009 4:11 pm

Postby richardk » Mon Aug 24, 2009 1:57 pm

So the documents roots are respectively in
1. domain.com
2. examplea.domain.com
3. exampleb.domain.com

All in their own directory, not something like
Code: Select all
example.com          --> public_html/
examplea.example.com --> public_html/examplea/
exampleb.example.com --> public_html/exampleb/


You didn't answer
I also have domain name examplea.com and exampleb.com which are redirected to examplea.domain.com and exampleb.domain.com respectively.

What is causing the redirect?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby grzx » Mon Aug 24, 2009 3:35 pm

Sorry for that.

So the documents roots are respectively in
1. domain.com -> httpdocs/
2. examplea.domain.com -> subdomain/examplea/httpdocs/
3. exampleb.domain.com -> subdomain/exampleb/httpdocs/

examplea.com is only a domain name, no hosting in it. The actual content is in examplea.domain.com. Therefore when people type in examplea.com they will be redirected to examplea.domain.com.

But I don't want people to know that examplea is subdomain of domain.com because both websites not related. Therefore I need the web browser to stay as examplea.com.
grzx
 
Posts: 4
Joined: Tue Aug 18, 2009 4:11 pm

Postby richardk » Sat Aug 29, 2009 1:43 pm

You still have no answered what is causing the current redirect.
I also have domain name examplea.com and exampleb.com which are redirected to examplea.domain.com and exampleb.domain.com respectively.

What is causing the redirect?

Unless you answer the question i can't tell you if it is possible (with mod_rewrite).
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron