You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jason Nunnelley <ja...@jasonn.com> on 2010/04/22 14:31:07 UTC
[users@httpd] Redirect all requests /BUT/ a given directory/URIs
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
Re: [users@httpd] Redirect all requests /BUT/ a given directory/URIs
Posted by Igor Cicimov <ic...@gmail.com>.
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 <ja...@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
>
>