Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why double slash dot (ie: \\.) in htaccess regex?

From another answer, this double slash dot is common

RedirectMatch 404 /\\.svn(/|$)

Since we're matching "/.svn" etc., why isn't this a single slash to escape the period?

like image 505
Eric Avatar asked Oct 12 '15 17:10

Eric


1 Answers

Double escaping is allowed here but not really required. So both of these rules will work:

RedirectMatch 410 /\\.svn(/|$)

OR

RedirectMatch 410 /\.svn(/|$)
like image 179
anubhava Avatar answered Nov 11 '22 08:11

anubhava