我如何重写这个网址:
http://www.example.com/delete-album?album_id=52
到此:
http://www.example.com/album/52/delete
这是我的.htaccess代码,它不起作用:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^album/([0-9]+)/?$/delete delete-album?album_id=$1 [L,QSA]
答案 0 :(得分:0)
您的RewriteRule
RewriteRule ^(album)/(\d+)/(delete)/?$ $3-$1?album_id=$2 [L,QSA,NC]