[thelist] Help with Mod Rewrite

Andy Warwick mailing.lists at creed.co.uk
Fri Apr 26 06:20:04 CDT 2002


Hi

I'm trying to set up a second server for an extranet for a client, but want to
redirect certian addresses back to the main server, thus:

http://www.example.com/             ==      main server
http://dev.example.com/             ==      second server

I want requests to be handled:

http://dev.example.com              -->     http://www.example.com/
http://dev.example.com/             -->     http://www.example.com/

Then:

http://dev.example.com/client1      -->     http://dev.example.com/client1/
http://dev.example.com/client1/     -->     http://dev.example.com/client1/
http://dev.example.com/client2      -->     http://dev.example.com/client2/
http://dev.example.com/client2/     -->     http://dev.example.com/client2/

And so on, so any request to the root directory on server 2 (dev) actually gets
the standard website on server 1 (www), and missing trailing slashes get added
on, but calls to subdirectories on server 2 get the correct files.

I figure I can do this with mod-rewrite in a .htaccess file, but I can't figure
out how.

Any pointers?

TIA

Andy W



More information about the thelist mailing list