httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Knowlton" <jknowl...@vp44.com>
Subject Re: [users@httpd] Redirect ANY request to one page
Date Sat, 14 Nov 2009 17:36:51 GMT
On Sat, November 14, 2009 6:01 pm, Philip Wigg wrote:
> Hi,
>
> Try using mod_rewrite. This configuration should work...
>
> RewriteEngine On
> RewriteCond %{REQUEST_URI} !^/park.html$
> RewriteRule (.*) /park.html [L, R]
>
> This redirects any request except park.html. Note that if park.html
> contains an image, css, or whatever, it's important to also have a
> condition to not redirect that image. For example, let's say park.html
> references an image called logo.gif in a folder called 'images', you
> could use:-
>
> RewriteEngine On
> RewriteCond %{REQUEST_URI} !^/park.html$
> RewriteCond %{REQUEST_URI} !^/images/logo.gif$
> RewriteRule (.*) /park.html [L, R]
>
> Cheers,
> Phil.
>
> ---------------------------------------------------------------------
> 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
>
>


It works great. Thanks for the help!

-JK


---------------------------------------------------------------------
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