本文介绍了.htaccess电子邮件/令牌的重写规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法完成这项工作,有什么想法吗?
I can't make this work, any ideas?
.htaccess代码:
.htaccess code:
Options +FollowSymlinks
Options -MultiViews
RewriteEngine On
RewriteRule ^unsubscribe/([^/]*)/(.*)/&$ unsubscribe.php?hash=$1&email=$2
我正在尝试转换此URL:
I'm trying to transform this URL:
unsubscribe.php?hash=dbacb2d010eb022619e90c8df2654aab273&[email protected]
对此:
unsubscribe/dbacb2d010eb022619e90c8df2654aab273/[email protected]
我真的尝试过搜索,我所拥有的代码是我所得到的,但是它不起作用...
I've really tried searching, and the code I have is what I got, but it isn't working...
谢谢!
推荐答案
替换此行:
RewriteRule ^unsubscribe/([^/]*)/(.*)/&$ unsubscribe.php?hash=$1&email=$2
通过这个:
RewriteRule ^unsubscribe/([^/]*)/(.*)/?$ /unsubscribe.php?hash=$1&email=$2 [L]
这篇关于.htaccess电子邮件/令牌的重写规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!