问题
I can't make this work, any ideas?
.htaccess code:
Options +FollowSymlinks
Options -MultiViews
RewriteEngine On
RewriteRule ^unsubscribe/([^/]*)/(.*)/&$ unsubscribe.php?hash=$1&email=$2
I'm trying to transform this URL:
unsubscribe.php?hash=dbacb2d010eb022619e90c8df2654aab273&email=enriquealbiola@iqs.edu
To this one:
unsubscribe/dbacb2d010eb022619e90c8df2654aab273/enriquealbiola@iqs.edu
I've really tried searching, and the code I have is what I got, but it isn't working...
Thanks!
回答1:
Replace this line :
RewriteRule ^unsubscribe/([^/]*)/(.*)/&$ unsubscribe.php?hash=$1&email=$2
By this one :
RewriteRule ^unsubscribe/([^/]*)/(.*)/?$ /unsubscribe.php?hash=$1&email=$2 [L]
来源:https://stackoverflow.com/questions/12144297/htaccess-rewrite-rule-for-email-token