我有一个格式如下的 URL:
http://domain.com/checkout/nonce/701fe0f652/order/108/?token=EC-0DS37792JX3680821
我尝试使用 .htaccess 将其转换为干净的 URL:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?token=(.*)$ /index.php/$1/token/$2/ [R]
RewriteRule 不知何故不起作用。我已经使用http://jakarta.apache.org/regexp/applet.html 对其进行了测试,并得到了完全匹配的结果。
我正在使用 CodeIgniter,并且已经测试直接放置干净的 URL (http://domain.com/checkout/nonce/701fe0f652/order/108/token/EC-0DS37792JX3680821) 没有问题。
有人可以帮助我吗?
谢谢你。
最好的祝福。