Re: Redirect ANY request to one page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux