httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Javier Martínez Fernández <ecentin...@gmail.com>
Subject [users@httpd] RewriteRule
Date Wed, 31 Jan 2007 19:44:40 GMT
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@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