Forum Moderators: phranque
"mainpage\.php\?id=16$"
to this:
"h*tp://w*w.domain.com/products/tools"
however the following syntax doesn't seem to do the trick in my .htaccess file:
RewriteEngine on
RewriteRule ^/mainpage\.php\?id=16$ h*tp://w*w.domain.com/products/tools/
Other than the fact I have asterisks in my coding, any suggestions? I thought mod_rewrite was easy to implement but how come it doesn't work with my PHP files that have id numbers in them?
Use
RewriteCond %{QUERY_STRING} ^your_pattern$
to match and/or create back-reference to query string data.
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim