开发者

What does the - mean on a Rewrite rule?

开发者 https://www.devze.com 2023-02-16 01:06 出处:网络
RewriteRule ^(dir1|file1) - [L] If this rule IS THE CASE then other rewrite rules should NOT apply. Since we are on a .htaccess context, having only the [L] will be useless.
RewriteRule ^(dir1|file1) - [L]

If this rule IS THE CASE then other rewrite rules should NOT apply.

Since we are on a .htaccess context, having only the [L] will be useless.

So, we need two things:

To have the - sign.

To have this rule before all other RewriteRules on our .htaccess file.

If all above assumptions are correct and precise, I would like to ask:

What does the - mean, and w开发者_运维百科hat does it do on this context?

Thanks a lot.


The docs have this info:

- (dash)

A dash indicates that no substitution should be performed (the existing path is passed through untouched). This is used when a flag (see below) needs to be applied without changing the path.

0

精彩评论

暂无评论...
验证码 换一张
取 消