0
因此改寫了我的醜PHP網址的東西更漂亮:強制美化URL用mod_rewrite的
RewriteEngine On
RewriteRule ^main/photo([^/\.]+)/?.html$ main/details.php?gid=$2pid=$1
不過,現在我想強迫任何人誰去
http://www.example.com/main/details.php?gid=20&pid=5
重定向到
htto://www.example.com/main/photo5.html
我試過以下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]
但這並沒有奏效。有任何想法嗎?
我得到發送到photo.html?pid = 5。 – 2009-06-25 16:05:25