.htaccess URL Rewrite

On our corporate intranet (bbcreports.systems.uk.mycorp) i have
created a PHP application in the directory public_html/php/edd

I want to have a 'virtual' domain, e.g.
http://edd.bbcreports.systems.uk.mycorp
which in effect points to
http://bbcreports.systems.uk.mycorp/php/edd/

From reading the apache docs, i've gleaned this bit of rewrite code...

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.[^.]+\.host\.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^www\.([^.]+)\.host\.com(.*) /home/$1$2


Last time i messed around with a .htaccess file i crashed the server
(i think!), so would appreciate some advice on the correct rewrite
rules... this is what i've got:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^\.[^.]+\.bbcreports
\.systems.uk.mycorp$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ([^.]+)\.bbcreports\.systems\.uk\.mycorp(.*) /home/$1/
php/$2

Thanks
Chris Jones [ Fr, 07 Dezember 2007 16:35 ] [ ID #1887995 ]
Webserver » alt.apache.configuration » .htaccess URL Rewrite

Vorheriges Thema: Apache-based authen/authz vs. alternatives
Nächstes Thema: Apache 2 rewrite and proxy - url encoding query string