https://issues.apache.org/bugzilla/show_bug.cgi?id=51858
Bug #: 51858
Summary: weird error for mod_rewrite with more then 3
parameteres
Product: Apache httpd-2
Version: 2.2.20
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_rewrite
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Hello.
I face some weird error for mod_rewrite
The following code works
RewriteRule ^([A-Za-z_0-9.]+)/?$ /tools/investigate/i.php?query=$1 [L]
RewriteRule ^([A-Za-z_0-9.]+)/([A-Za-z_0-9.]+)/?$ /tools/$2/i.php?query=$1 [L]
RewriteRule
^([A-Za-z_0-9.]+)/([A-Za-z_0-9.]+)/([A-Za-z_0-9.]+)/([A-Za-z_0-9.]*)/?$
/tools/$2/i.php?query=$1&spider=$3&searchkeywords=$4 [L]
But if I add ? to the last string before last variable, apache returns 500
because of the mod_rewrite "infinite" loop
RewriteRule ^([A-Za-z_0-9.]+)/?$ /tools/investigate/i.php?query=$1 [L]
RewriteRule ^([A-Za-z_0-9.]+)/([A-Za-z_0-9.]+)/?$ /tools/$2/i.php?query=$1 [L]
RewriteRule
^([A-Za-z_0-9.]+)/([A-Za-z_0-9.]+)/([A-Za-z_0-9.]+)/?([A-Za-z_0-9.]*)/?$
/tools/$2/i.php?query=$1&spider=$3&searchkeywords=$4 [L]
If you don't see it, i'll make things more clear
/$1/$2/$3/$4 works, but /$1/$2/$3/?$4 not.
Is it a mod_rewrite bug.
Sorry for my English, it is my second language.
Thank you.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]