lhsmath/lhsmath.org/master/.htaccess - Htaccess File

lhsmath/lhsmath.org/master/.htaccess

#
# .htaccess
# LHS Math Club Website
#

# No funny business, all features disabled;
# Symlinks are necessary for URL Rewriting
Options None +FollowSymLinks

DirectoryIndex index.php

# Error Pages
ErrorDocument 400 /Error.php
ErrorDocument 401 /Error.php
ErrorDocument 403 /Error.php
ErrorDocument 404 /Error.php
ErrorDocument 500 /Error.php

AddType application/x-java-jnlp-file .jnlp

# Hide all files/directories starting with a dot
#   for example, .htaccess, .content
<FilesMatch "^.(.*)$">
  Require all denied
</FilesMatch>

# URL REWRITING SECTION
RewriteEngine on

# To show a "Down for Repairs" message, uncomment this line:
# RewriteRule ^(.*)$ Site_Down.php
# (Alternatively, go to the lhsmath Site management page on NFSN and click "Enter Maintenance Mode", but that's not as pretty)

# Allow access to files without typing '.php' extension
#   example: http://lhsmath.co.cc/file  --->  /file.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php

# Allow access to /lmt as well as /LMT
RewriteRule ^lmt(.*) LMT$1

# Block all files and directories (and their contents) starting with a dot
RewriteRule ^.((.*)/(.*))*$ - [F]

On Github License

Files

Download PDF of Htaccess file
REQUEST_FILENAME

Comments

Apache