Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add [OR] to rewrite condition #1095

Merged
merged 2 commits into from

2 participants

@clarkni5

The rewrite condition that looks for files and directories starting with a dot is missing an [OR] between the two conditions. The first condition checks to see if the request matches a directory and the second condition checks to see if it matches a file. Without the [OR], the condition always fails.

@necolas necolas merged commit 3942ee1 into from
@necolas
Owner

Thanks!

@alrra alrra referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@alrra alrra referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 18, 2012
  1. @clarkni5
  2. @clarkni5

    Update documentation.

    clarkni5 authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 .htaccess
View
4 .htaccess
@@ -463,10 +463,10 @@ AddCharset utf-8 .css .js .xml .json .rss .atom
</IfModule>
-# Block access to "hidden" directories whose names begin with a period. This
+# Block access to "hidden" directories or files whose names begin with a period. This
# includes directories used by version control systems such as Subversion or Git.
<IfModule mod_rewrite.c>
- RewriteCond %{SCRIPT_FILENAME} -d
+ RewriteCond %{SCRIPT_FILENAME} -d [OR]
RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule "(^|/)\." - [F]
</IfModule>
Something went wrong with that request. Please try again.