montclairguy - 9:58 pm on Apr 16, 2013 (gmt 0) [edited by: bill at 9:00 am (utc) on Apr 17, 2013]
For files that don't actually exist in a "search" directory, this rewrite rule:
RewriteCond /usr/local/apache/htdocs/search/$1 !-f
RewriteRule /search/(.*) /usr/local/apache/cgi-bin/s.cgi?$1 [L,T=application/x-httpd-cgi,NE,NC]
allows me to use URLs like this:
instead of this:
I'm aware of other methods of doing this to separate the query sections removing ampersands and equal signs, but I don't care about that right now. The problem I'm having is with a form which uses "get" instead of "post". The browser address bar is showing this, which probably means s.cgi is getting the question mark sent to it:
I need the question mark removed when submitting a form with the "get" method. Again, this rule works perfectly for direct links and forms using post.
Sorry if this is an easy one, but mod_rewrite is not one of my strong points. Also, this is an older version of Apache and mod_rewrite and it cannot handle (?:) style handle back-references.
[edit reason] disable smilies [/edit]
[edited by: bill at 9:00 am (utc) on Apr 17, 2013]