Forum Moderators: phranque
# Externally redirect only direct client requests for script filepath back to search-friendly URL
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /scripts/widget\.php\?color=([^&\ ]+)\ HTTP/
RewriteRule ^scripts/widget\.php$ http://www.example.com/page/%1.html? [R=301,L]
#
# Internally rewrite search-friendly widget requests to script
RewriteRule ^page/([^.]+)\.html$ /scripts/widget.php?color=$1 [L]