wgroeneveld/dedesemdoos/master/.htaccess - Htaccess File

wgroeneveld/dedesemdoos/master/.htaccess

# Require all granted MOET er bij bij OSX 10.10
# bedankt, http://coolestguidesontheplanet.com/forbidden-403-you-dont-have-permission-to-access-username-on-this-server/
# ook handig: http://htaccess.madewithlove.be/

# Caching schema
<FilesMatch ".(jpg|png|css|js)$">
Header set Cache-Control "public, max-age=28800"
</FilesMatch>

# ###
# Prevent viewing of files
<Files ~ "^.(htaccess|htpasswd)$">
deny from all
</Files>

<Files db.sqlite3>
order allow,deny
deny from all
</Files>

<FilesMatch "admin.php">
AuthName "Member Only"
AuthType Basic
AuthUserFile /home/deb34650n2/domains/redzuurdesem.be/public_html/desemdoos/.htpasswd
require valid-user
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
Satisfy Any
</FilesMatch>
# ###

# ###
# Prevent directory listings
Options All -Indexes
Options +FollowSymLinks -MultiViews

ErrorDocument 404 /desemdoos/404.php

# ###
# prettify URLs, redirect everything to x.php

RewriteEngine On
RewriteBase /desemdoos/

# needed for development, since parent .htaccess is missing.
RewriteCond %{HTTP_HOST} ^localhost$ [NC]
RewriteCond %{REQUEST_URI} !(/$|.|^$)
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]
RewriteCond %{HTTP_HOST} ^localhost$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ $1.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !bestel.php?cadeau=(.*)/$
RewriteRule ^bestel/cadeau/? bestel.php?cadeau=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !betaal.php?id=(.*)/$
RewriteRule ^betaal/(.*).php/? betaal.php?id=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !recept.php?id=(.*)/$
RewriteRule ^recept/(.*).php/? recept.php?id=$1 [L]

# ###

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, REQUEST_FILENAME, REQUEST_URI

Comments

Apache