RewriteRule

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

 



I'm making a rewrite rule and I'm having problems with the "?" character
My rule is this
RewriteRule ^([a-z0-9-]+)/?([a-z0-9-]+)?/?([0-9]+)?\?([a-z0-9=]+)?$ index.php?controller=$1&action=$2&id=$3&$4 [NC,L] and the url I test is "http://localhost:8888/kmodo/something/more/1? mivar=5"

It doesn't work, but I change the rule to
RewriteRule ^([a-z0-9-]+)/?([a-z0-9-]+)?/?([0-9]+)?\\([a-z0-9=]+)?$ index.php?controller=$1&action=$2&id=$3&$4 [NC,L] and test the url with "http://localhost:8888/kmodo/something/more/1 \mivar=5"

The rewrite is working (see the difference  between \\ with \?).

Someone can say me what I'm doing wrong?

PD: regular expressions are my weak point :)

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