我的客户旧网页包含www.domain.com/client/default.asp?wa_id=558&wa_object_id=1&wa_id_key=25092d5959fd9f212d5c0f63a5f0efb2
种网址。
现在我们已经安装了新的CMS,我们希望通过转换网址来保留旧网址。
我想写.htacess URL下一步是什么
client/default.asp?wa_id=558&wa_object_id=1&wa_id_key=25092d5959fd9f212d5c0f63a5f0efb2
转换为
index.php?id=client/default.asp?wa_id=558&wa_object_id=1&wa_id_key=25092d5959fd9f212d5c0f63a5f0efb2
我试过了,但是
RewriteRule ^client/(.*)$ index.php?id=$1 [L]
结果是
index.php?id=client/default.asp
答案 0 :(得分:2)
只需添加 QSA 标记:
RewriteRule ^client/(.*)$ index.php?id=$1 [QSA,L]
http://httpd.apache.org/docs/current/rewrite/flags.html#flag_qsa