3

我无法完成这项工作,有什么想法吗?

.ht 访问代码:

Options +FollowSymlinks
Options -MultiViews
RewriteEngine On
RewriteRule ^unsubscribe/([^/]*)/(.*)/&$ unsubscribe.php?hash=$1&email=$2

我正在尝试转换此 URL:

unsubscribe.php?hash=dbacb2d010eb022619e90c8df2654aab273&email=enriquealbiola@iqs.edu

对此:

unsubscribe/dbacb2d010eb022619e90c8df2654aab273/enriquealbiola@iqs.edu

我真的尝试过搜索,我拥有的代码就是我得到的,但它不起作用......

谢谢!

4

1 回答 1

3

替换这一行:

RewriteRule ^unsubscribe/([^/]*)/(.*)/&$ unsubscribe.php?hash=$1&email=$2

通过这个:

RewriteRule ^unsubscribe/([^/]*)/(.*)/?$ /unsubscribe.php?hash=$1&email=$2 [L]
于 2012-08-27T14:51:34.393 回答