MEM
MEM

Reputation: 31347

What does the - mean on a Rewrite rule?

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 what does it do on this context?

Thanks a lot.

Upvotes: 1

Views: 845

Answers (1)

Dave Child
Dave Child

Reputation: 7891

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.

Upvotes: 4

Related Questions