I need to filter out any spam requests in our url that has email address or any sort of personal information.
For example : if anyone enters the url
www.mydomain.com/en-us?email=abc@gmail.com
it should redirect to
www.mydomain.com/en-us?email=
[Use regex to pattern match the email and remove that] basically it should keep the url as is and remove emailaddress
another example
Redirect
www.mydomain.com/en-us/sompePage/SomeStructure?query=abc.gmail.com
to
www.mydomain.com/en-us/sompePage/SomeStructure?query=
This is what I tried :
(http|https)://mydomain.com/(^((?!\.)[\w-_.]*[^.])(@\w+)(\.\w+(\.\w+)?[^.\W])$
but throws an error
Back story and reasoning, if interested
We looked at google analytics and realized that our website is getting with a random email address with a random query string. But Google is marking them as storing personal information and hence see it as a violation of policy. Sl we are trying to place some regex in akamai so that these requests never hit the server. (We also have a fallback javascript in place to handle the same)