I have a simple rewrite rule to correct some 404s on a site I work on, but the redirect is not functioning correctly. I am trying to redirect http://www.site.com/eve.. to http://www.site.com/ with any the below (each tried separately):
RewriteRule ^eve..$ http://www.site.com/ [R=301,L]
RewriteRule ^eve.. http://www.site.com/ [R=301,L]
RewriteRule ^eve\.\.$ http://www.site.com/ [R=301,L]
RewriteRule ^eve\.\. http://www.site.com/ [R=301,L]
RewriteRule ^eve\.\./?$ http://www.site.com/ [R=301,L,NC]
None are successful. However the following does work:
RewriteRule ^eve http://www.site.com/ [R=301,L]
But this rule is too generic and I want to exactly match the redirects to prevent future issues.
what is wrong with my attempts to redirect the exact URL?
Thank you
Escape the dots like this:
Dot
.means any character and your stringeve..can matcheveryoreve11as well.