Forum Moderators: phranque
I have 2 registred domains who point to the same IP:
[plugab.example.com...]
[pitzka.example.com...]
I would like to redirect the second one to a folder /gallery, for example, and leave the first one untouched.
How can it be done? I've tried many mod_rewrite options, yet all has failed and I get 500 error.
10x in advance, hope I can help you with anything
*Edit*
I've managed to do so using javascript that looks like that:
<script language="JavaScript">
<!--
if( -1 == location.href.
toLowerCase().
indexOf('plugab.example.com') )
{
location.href =
'http://pitzka.example.com/pitzka/gallery/index.php';
}
will reffer all to the gallery unless address is plugab. Thats working, yet I have a feeling it should be done using mod_rewrite...
[edited by: jdMorgan at 2:57 pm (utc) on July 28, 2004]
[edit reason] Removed specifics per TOS [/edit]
Welcome to WebmasterWorld [webmasterworld.com]!
> I've tried many mod_rewrite options, yet all has failed and I get 500 error.
Please post one of your mod_rewrite examples for discussion. Alternatively, you can search WebmasterWorld for phrases such as "subdomain subdirectory rewriterule".
Our forum charter [webmasterworld.com] contains information about this forum and a few links to resources to get you started.
Jim