farizhermawan/idem/master/.htaccess
Options -Indexes
IndexIgnore */*
<filesMatch ".(html|htm|js|css|jpg|png)$">
FileETag None
<ifModule mod_headers.c>
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</ifModule>
</filesMatch>
RewriteEngine on
RewriteBase /idem/
################################ Common Config ##################################
# Force Trailing Slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ $1/ [L,R]
# Nothing todo if in assets, lib or layout
RewriteCond %{REQUEST_URI} /(assets|lib|layout)/ [NC]
RewriteRule .* - [L]
################################ Application Layer ##################################
# api layer
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} /api/
RewriteRule ^api/(.+)?$ layer/api/$1 [L]
# default layer
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)?$ layer/mahasiswa/$1 [L]
On Github License
Files
Download PDF of Htaccess file