Home RewriteRule for Gmail Email Addresses
Reply: 0

RewriteRule for Gmail Email Addresses

user984 Published in July 18, 2018, 6:19 am

I'm trying to create a rewrite rule for unsubscribe URLs so that the url


will be re-written to


In the past I've always used the following rule with no problems

ReWriteRule ^unsubscribe/(.*)/?$ /unsubscribe.php?email=$1 [NC,L]

However, when testing this recently, it seems to be replacing the "+" character (as is used commonly with gmail tagging, for example "myemail+spam@example.com") with an empty space, creating an email address different to the one entered by the user. This is a problem. You can see an example here:

Example Rewrite Rule Processing

I don't really get why this is happening as the "(.*)" filter should allow any character any number of times, shouldn't it?

Any suggestions would be greatly appreciated.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.338304 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO