Do you have to escape a forward slash when using mod_rewrite?

前端 未结 1 1368
情歌与酒
情歌与酒 2020-12-31 00:41

With regards to the forward slash \"/\" when giving a regex to RewriteRule or RewriteCond, or anything else related to .htaccess in particular, is there a need to escape the

1条回答
  •  失恋的感觉
    2020-12-31 01:10

    No, you do not have to escape slashes. Forward slashes don't have any special meaning in regular expressions.

    The one common character that has bitten me in the past is ? in query strings. That one you do have to escape.

    0 讨论(0)
提交回复
热议问题