Forum Moderators: phranque
www.mysite.com/servlet/Detail?no=555
the I need redirected to:
www.mysite.com/detail.php?no=555
For the life of me I cannot get the htaccess file to parse the '?' character
Here is my rule:
RewriteRule ^/servlet/Detail.no=(.*) /detail.php?no=%1 [L]
What am I missing?
THANKS!
If you do need to handle/change the query string, you must use a RewriteCond and reference the %{QUERY_STRING} variable.
The query string is not visible to RewriteRule, since it is not part of the URL, but rather, data attached to the request to be passed to the resource at that URL.
Note that the "?" serves only to delineate the URL from the query string, and will appear in neither the RewriteRule URL-path nor the %{QUERY_STRING} value.
See Note: Query String following the Apache mod_rewrite RewriteRule documentation [httpd.apache.org]
Jim