1

What's the difference between:

RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule ^ - [L]

and this one:

RewriteCond %{ENV:REDIRECT_STATUS} ^.
RewriteRule ^ - [L]

It happened that this last one used to work just fine for a long time, until suddenly it stopped working causing Apache to show the directory listing! The first one solved the issue. So what's wrong with the second one?

Thank you

Timido
  • 1,646
  • 2
  • 13
  • 16

1 Answers1

1
RewriteCond %{ENV:REDIRECT_STATUS} 200

Checks whether REDIRECT_STATUS environment variable is equal to 200 (in fact, the pattern will match any string containing 200).

RewriteCond %{ENV:REDIRECT_STATUS} ^.

Checks whether REDIRECT_STATUS environment variable is at least one character long.

The second one should work since 200 should match ^.. Perhaps the problem lies elsewhere.

Salman A
  • 262,204
  • 82
  • 430
  • 521