httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Ionescu <>
Subject Re: [users@httpd] rewrite rule
Date Mon, 29 May 2006 17:54:41 GMT
Mariusz Handke wrote:
> This wouldn't work (RewriteCond) since $2 and $3 are not known
> at this stage of rewriting process yet, but I'm still working on it

- That won't work. You can't use back references from mod_rewrite in a 

- They're known, as Axel-St├ęphane already said.

- You must use a kind of tricky solution using a regEx internal back 

- Why are you using a <Location> container at all?

So you expect /test/file.html to be rewritten to 

expecting per-server context (in other words: main server config section 
or in a <virtualhost>, if you're using virtual hosts:

RewriteEngine On
RewriteCond %{HTTP_REFERRER}<>$1 !(/test/.+)<>\1$
RewriteRule ^(/test/[^/]*\.(html?|php))$ /test-redir.php?page=$1 [L,NS]


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message