apache - .htaccess redirect if URL contains an email address -
i want allow clean urls in form of domain.com/me@msn.com should redirect domain.com/?profile=me@msn.com (url encoded or not).
what rewriterule achieve this? should detect email address in url redirect.
it's painful match mail addresses regular expressions. rfc-2822 compliant regex 2 pages long. matching @
should, however, suffice in scenario.
rewriteengine on rewriterule ^((?<!results=).*@.*)$ ?profile=%1 [l]
edit: make sure manually navigating ?profile=...
still works asserting case.
Comments
Post a Comment