dmed256/site/master/.htaccess - Htaccess File

dmed256/site/master/.htaccess

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

DirectorySlash Off

RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.+?)/?$ /$1.html [L]

# To externally redirect /dir/foo.html to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s([^.]+).html [NC]
RewriteRule ^ %1 [R,L,NC]

ErrorDocument 404 /404.html

On Github License

Files

Download PDF of Htaccess file
DOCUMENT_ROOT, THE_REQUEST

Comments

Apache