Mod Rewrite Case Insensitive 02.10.08
Hi, thanks for looking at our quick project.
Right now, on our Linux Apache server, we have a mod rewrite that goes like this:
RewriteRule ^(.*)z(.*)$ $1cgi-bin/search3.cgi?dbfile=/home/autopa5/public_html/cgi-bin/database.exm&multiple=1&option_1=pm&option_2=pm&option_3=pm&option_4=pm&option_5=pm&option_6=pm&option_7=pm&option_8=pm&option_9=pm&option_10=pm&option_11=pm&input=$2
This is telling our server that if it gets any URL that starts with a Z, it should load the search URL, with the text after the “z” plugged in as the search input.
So, for example,
http://www.autopages.com/zbro_5705
redirects to
http://www.autopages.com/cgi-bin/search3.cgi?dbfile=/home/autopa5/public_html/cgi-bin/database.exm&multiple=1&option_1=pm&option_2=pm&option_3=pm&option_4=pm&option_5=pm&option_6=pm&option_7=pm&option_8=pm&option_9=pm&option_10=pm&option_11=pm&input=bro_5705
It’s working fine. The only problem is this … it treats all input as case sensitive. So, if someone wrote “autopages.com/ZBRO_5705″, it would lead to an error page. This is weird, because if you plug in ‘BRO_5705″ into the normal search URL above, it leads to the right page (i.e., the search itself is not case sensitive).
We need a tweak to the mod rewrite statement that makes it case insensitive.
Let us know if you can help, thank you.



