Skip to content

Commit

Permalink
Potential improvement of .htaccess
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Oct 14, 2014
1 parent c10882f commit 5134b28
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ RewriteEngine On

# RewriteBase /

# Access site
# access site
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]

# Block various user files from being accessed directly
RewriteRule ^user/accounts/(.*)$ error [R=301,L]
RewriteRule ^user/config/(.*)$ error [R=301,L]
RewriteRule ^user/(.*)\.(txt|md|html|php|yaml|json|twig|sh|bat)$ error [R=301,L]
# block various user files from being accessed directly
RewriteRule ^user/accounts/(.*)$ error [L]
RewriteRule ^user/config/(.*)$ error [L]
RewriteRule ^user/(.*)\.(txt|md|html|php|yaml|json|twig|sh|bat)$ error [L]

# Block cache/
RewriteRule ^cache/(.*) error [R=301,L]
# block cache
RewriteRule ^cache/(.*) error [L]

# Block bin/
RewriteRule ^bin/(.*)$ error [R=301,L]
# block bin
RewriteRule ^bin/(.*)$ error [L]

# Block system/
RewriteRule ^system/(.*)$ error [R=301,L]
# block system
RewriteRule ^system/(.*)\.(txt|md|html|php|sh|bat|yaml)$ error [L]

# Block vendor/
# RewriteRule ^vendor/(.*)$ error [R=301,L]
# block vendor (non CSS/JS)
RewriteRule ^vendor/(.*)\.(txt|md|htmlphp|sh|bat|yaml)$ error [L]

This comment has been minimized.

Copy link
@w00fz

w00fz Oct 14, 2014

Member

Is this a typo? The OR between html and php that's gone?

This comment has been minimized.

Copy link
@rhukster

rhukster Oct 14, 2014

Author Member

Yup, typo.. good catch. Thanks.


</IfModule>

Expand Down

0 comments on commit 5134b28

Please sign in to comment.