Show different domain

Using a single web hosting account to host multiple sites

Show different domain

Postby Simbyte » Tue Feb 05, 2008 5:43 pm

Hi,

I have a Domain http://nicedomain.com. It redirects per confixx menu to http://this.domain.is.not.looking.nice.com

Now I want, that even if the user is redirected to http://this.domain.is.not.looking.nice.com, he still sees http://nicedomain.com in his adress bar.

This should also work for all deeper links, so if you visit a link /files/a.html, it should be http://nicedomain.com/files/a.html


I hope you understood me alright though I'm not a native speaker.


Could you help me to create a fitting mod_rewrite file?



Yours Simbyte
Simbyte
 
Posts: 9
Joined: Tue Feb 05, 2008 5:37 pm

Postby richardk » Wed Feb 06, 2008 4:12 pm

You will need mod_proxy as well as mod_rewrite.

Try the following in a .htaccess file in nicedomain.com's document root
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^(.*)$ http://this.domain.is.not.looking.nice.com/$1 [P,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby Simbyte » Thu Feb 07, 2008 9:32 am

It doesn't work :(

I have done as you told, only of course changed the domain's name.


If I let the redirect in, nothing happens to the domain. If I point it to the html folder of the nice domain (/), I get an 500 Internal Error.
Simbyte
 
Posts: 9
Joined: Tue Feb 05, 2008 5:37 pm

Postby Simbyte » Thu Feb 07, 2008 3:41 pm

I have looked into phpinfo() of nicedomain.com

In loaded modules, there is the following text:

core mod_log_config mod_logio prefork http_core mod_so mod_alias mod_auth_basic mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_include mod_mime mod_python mod_negotiation mod_php5 mod_rewrite mod_setenvif mod_ssl mod_status mod_suexec



So this means mod_proxy is not enabled?
Could I get the same result if I persuade the admin to change the entry in admin c?
Simbyte
 
Posts: 9
Joined: Tue Feb 05, 2008 5:37 pm

Postby richardk » Thu Feb 07, 2008 4:08 pm

Mod_rewrite can't do it without mod_proxy. you will need to talk to your host/admin.
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 2 guests

cron