Forum Moderators: phranque
RewriteRule test.html$ script.php?db=parameter
RewriteRule script.php?db=parameter$ test.html [R=301]
# Externally redirect only direct client requests for
# 'unfriendly' dynamic URL to 'search-friendly' URL
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /script\.php\?(([^&#\ ]*&)*)db=([^&#\ ]*)((&[^#\ ]*)*)(#[\ ]*)?\ HTTP/
RewriteRule /script\.php http://www.example.com/test.html? [R=301,L]
#
# Internally rewrite 'search-friendly' URL requests to internal script filepath
RewriteRule ^test\.html$ script.php?db=parameter [L]