Rewrite from domain to another domain (to a directory)

Using a single web hosting account to host multiple sites

Rewrite from domain to another domain (to a directory)

Postby ginopino » Thu Sep 10, 2009 4:51 am

Hi everybody,
I need to rewrite the url of a domain and the calls of its pages (e.g.: http://www.caminettohotel.it/index.shtml ) to another domain (e.g.: http://www.mediatourist.it/Ita/Hotel_ca ... ndex.shtml).

I try with:
Code: Select all
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteRule ^(.*)$ http://www.mediatourist.it/Ita/Hotel_caminetto/$1 [L]


but I get

Code: Select all
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@register.it and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.8b DAV/2 PHP/5.1.2 Server at www.caminettohotel.it Port 80


Is it possible? What is wrong?

Thank you very much.
ginopino
 
Posts: 2
Joined: Thu Sep 10, 2009 4:35 am

Postby richardk » Thu Sep 10, 2009 7:19 am

but I get Internal Server Error

Try this mod_rewrite test. If you get a 500 error, remove the Options line.

Do the domains go to the same server?
Is the URL supposed to stay the same (caminettohotel.it/index.shtml)?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby ginopino » Thu Sep 10, 2009 7:34 am

The test was passed without problems. No errors.

The server is different and I need to rewrite all pages of www.caminettohotel.it to the other domain...
ginopino
 
Posts: 2
Joined: Thu Sep 10, 2009 4:35 am

Postby richardk » Thu Sep 10, 2009 7:55 am

Try
Code: Select all
Redirect 301 / http://www.mediatourist.it/Ita/Hotel_caminetto/

or
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^(.*)$ http://www.mediatourist.it/Ita/Hotel_caminetto/$1 [P,L]
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 25 guests

cron