httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Cicimov <icici...@gmail.com>
Subject Re: [users@httpd] Redirect all requests /BUT/ a given directory/URIs
Date Fri, 23 Apr 2010 06:43:23 GMT
You can try this for the first part of the question:


RewriteEngine On
RewriteCond %{REQUEST_URI} !^/some/directory/path/(.*)$
RewriteRule .* some/other/path/%1 [R,L]

I would also suggest you read through mod_rewrite page

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html

Igor

On Thu, Apr 22, 2010 at 10:31 PM, Jason Nunnelley <jason@jasonn.com> wrote:

> Any of you Apache geniuses know how to .htaccess redirect everything BUT a
> given directory path?
>
> And, I'll add another twist: it's another URL I need to write. So, I need
> local/page.html to rewrite remote/page.html in every case but
> local/specified_directory.
>
> --
>
> Jason A. Nunnelley
> +1 2562971652
>
> http://www.google.com/profiles/imjasonn
>
> [Member Tekany, LLC]
>
>
> ---------------------------------------------------------------------
> 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: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Mime
View raw message