Sub.domain.com -> addondomain.com

Using a single web hosting account to host multiple sites

Sub.domain.com -> addondomain.com

Postby preaxz » Thu Dec 07, 2006 9:18 pm

Hi there ...

here it is, try to open these link:

http://preaxz.netcworld.org <== the subdomain
http://preaxz.com <== the addon domain

and then this:

http://netcworld.org/preaxz

There you'll find that if you open the last link, the browsers address bars shows preaxz.com instead of netcworld.org/preaxz. But if you open the first link, the browsers address bar remain unchange.

I'm new to this kinda mod_rewrite thing. I had another domain added to my host. It's done by cpanel, but unfortunately, the server was also create a subdomain for that add-on domain and it can not be deleted.

I need my visitors can only open my site from preaxz.com, hence it cannot accessible from preaxz.netcworld.com. Is it possible to use mod_rewrite to do that?

Thanks before, and I'm sorry for my poor english. It's just not my main language since I came from Indonesia.
preaxz
 
Posts: 2
Joined: Thu Dec 07, 2006 1:49 am
Location: Halfway to Somewhere

Postby preaxz » Thu Dec 07, 2006 10:45 pm

:D

Never mind ... problem resolved .. hehehehe

Code: Select all
RewriteEngine on
RewriteCond %{HTTP_HOST} ^preaxz.netcworld.org$ [OR]
RewriteCond %{HTTP_HOST} ^www.preaxz.netcworld.org$
RewriteRule ^(.*)$ http://preaxz.com [R=301,L]
preaxz
 
Posts: 2
Joined: Thu Dec 07, 2006 1:49 am
Location: Halfway to Somewhere


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 99 guests

cron