我想转换此网址:
http://something.com/FLSD/DSS/?d=624
进入这个:
http://something.com/FLSD/DSS/624/
我该怎么做?
答案 0 :(得分:1)
将此添加到.htaccess文件中:
RewriteEngine On
RewriteBase /
RewriteRule ^FLSD/DSS/([0-9]+)/?$ /FLSD/DSS/?d=$1
答案 1 :(得分:0)
这应该有效:
RewriteEngine on
RewriteCond %{THE_REQUEST} ^(GET|POST)\ /FLSD/DSS/\?d=([0-9]+)\ HTTP
RewriteRule ^ /FLSD/DSS/%2\? [R=301,L]
RewriteRule ^FLSD/DSS/([0-9]+)/?$ /FLSD/DSS/?d=$1 [L]
它会将http://something.com/FLSD/DSS/?d=624
转换为http://something.com/FLSD/DSS/624/