On 29/01/2008, Vincent Bray <[EMAIL PROTECTED]> wrote:
> On 29/01/2008, Szymon Bakowski <[EMAIL PROTECTED]> wrote:
> > mod-rewrite and Redirect directive: what I wanted to achieve is to
> > include from within VirtualHost a file for permanent redirections
> > (using simply "Redirect" inside )and one for mod_rewrite directives.
> > From some reason I cannot make Redirect directive make work at all
> > (whether I include it before or after inclusion of the file with
> > mod_rewrite rules).
>
> Your rewrite rules will always run, regardless of there being a
> Redirect directive (before or after doesn't matter) that matches the
> request. You have a number of options:
>
>  1) Guard your ruleset with RewriteCond %{REQUEST_URI} 
> !^/path_used_in_redirect
>  2) Use mod_rewrite rather than Redirect, with RewriteRule's [R] flag
>  3) Do the rewriting anyway and if the result of the rewrite should
> then match a Redirect, use [PT] to make sure the Redirect gets a
> chance to match the rewritten path.
>
> HTH.
>
> --
> noodl

Brilliant. Thanks a million for your advice!

best regards
Szymon

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to