Re: mod_rewrite problem

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

 



On 6/4/07, José Ramón López <joseramonlopez@xxxxxxxxx> wrote:
Hi List!

 I am trying to configure a rule with mod_rewrite, which allow me to change
the value of one script parameter.

 I want the script to foward me to an error page when introducing
service=wfs  in the request

 The sevice=wfs parameter can be in all positions
 This is my line:
 RewriteRule ^/cgi-bin/wms\?(.*)service=wfs$ /error.html
 Is it correct?
 If i put the line as follows, it works perfectly:

 RewriteRule ^/cgi-bin/wms\? /error.html

 But when I add the service parameter, it executes the script and it does
not forward me to that page, (I mean as follow:)
 RewriteRule ^/cgi-bin/wms\?service=wfs /error.html

RewriteRule doesn't match against the query string. You will need to
use a RewriteCond for this.
something like this:

RewriteCond %{QUERY_STRING}    ^service=wfs$
RewriteRule ^/cgi-bin/wms$             /error.html

Krist

--
krist.vanbesien@xxxxxxxxx
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

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