So have rewritten my ugly php URL to something prettier:
RewriteEngine On
RewriteRule ^main/photo([^/\.]+)/?.html$ main/details.php?gid=$2pid=$1
However, now I want to force anyone who goes to
http://www.example.com/main/details.php?gid=20&pid=5
to redirect to
htto://www.example.com/main/photo5.html
I have tried the following RewriteCond:
RewriteCond %{REQUEST_URI} ^/main/details\.php [NC]
RewriteRule ^main/details.php?gid=(.*)&pid=(.*) http://www.example.com/main/photo$1.html [R=301,L]
But that didn't work. Any ideas?