You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Sanjay Saha <sa...@yahoo.co.uk> on 2006/03/24 12:46:03 UTC

[users@httpd] The logic behind URL rewriting



Hi List,

If anybody could tell here,
the logic behind an expression matching .
I needed to tweak an apache expression matching to suit my 
subdomain's url rewriting . 

 <VirtualHost *>
 ServerName aaa.domain.com
 RedirectMatch (.*)\ .*$ https://www.domain.com/aaa$1
       ------x-------
This match is confirming any url like below,

=> bbb.domain.com
=> https://www.bbb.domain.com/index.jsp
=> www.bbb.domain.com
=>domain.com/bbb

rediected to as following ,

=>https://www.domain.com/bbb/index.jsp
=>https://www.domain.com/bbb/


Now i cann't figure out whats the function of $1 in the Redirectmatch here 

Regards...

 

Sanjay Saha
Senior System Administrator
http://www.sanjaysaha.in

Cel=+919830223862
		
---------------------------------
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.