Re: [users@httpd] RedirectMatch regex question.

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

 



On 6/7/05, Michael Bellears <Michael.Bellears@xxxxxxxxxxxxxxxxxxx> wrote:
> Wondering if someone can please assist with the following two
> RedirectMatch regex's (My regex skills are zilch!)
> 
> RedirectMatch /main.cfm?=page&content&id=946
> http://www.domain.com.au/privacy.html
> RedirectMatch /main.cfm?page=unsubscribe
> http://www.domain.com.au/unsubscribe/index.html
> 
> The ".", "?" , "&" + "=" signs probably need escape char in front of
> them, but every combo I've tried fails miserably!

Using mod_alias to deal with the query string is not, in general, a good idea.

Try mod_rewrite instead.  For your second Redirect, it would look
something like this:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^page=unsubscribe$
RewriteRule ^/main.cfm http://www.domain.com.au/unsubscribe/index.html [R]

But be sure to consult the mod_rewrite docs.

Joshua.

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