|
Home > Archive > Apache Server configuration support > August 2006 > htaccess redirect
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
|
|
| <kwodo.contact@gmail.com> schreef in bericht
news:1154472627.388259.50610@p79g2000cwp.googlegroups.com...
> I have been bashing my head to solve this. I am not very good at
> htaccess. 
>
> There is 2 different domains, www.example1.net and www.example2.com.
>
> I want to redirect a new domain to a folder on the original domain.
>
> e.g. www.example1.net to www.example2.com/folder/index.html
>
Just an untested thought ...
.... put into .htaccess at the document root of www.example1.net
RewriteEngine On
RewriteCond %{HTTP_REQUEST} !^(script|style|shared_images)
RewriteCond %{HTTP_HOST} ^www.example1.net$
RewriteRule (.*) folder/$1
Using .htacces [this way] has a [firm] performance penalty.
If you have full control over the server running these sites, consider
setting up a vhost for both sites, using the respective documentroots. Then
add to the vhost config of www.example2.com and alias 'folder' for the
documentroot of www.example1.net
You're up for a strong strugly to get all links to and from /folder/*
working at both ways.
HansH
|
|
|
|
|