|
| Hello,
I'm currently using rewrite to eliminate url suffix (see
< http://www.vandervossen.net/2003/07/clean_url >.
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.html [L]
This works fine on the site (url in sig if you want to see it in
action). Now, I'd like to add a separate rule to rewrite the target of a
search form that uses get. Instead of making the action e.g.,
"/cgi-bin/search.pl?q=lunch", I'd like to use
"/site/search/results?q=lunch". Is this possible to do?
I was not able to make it work. Here's a test case. My .htaccess now
includes this:
RewriteEngine on
RewriteRule /site/search/results(.*) /cgi-bin/hw.cgi [L]
The url http://www.tsmchughs.com/site/search/results produces a 500
server error. The script, however, works fine.
http://www.tsmchughs.com/cgi-bin/hw.cgi
--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
|
|