nikolaposa/devpage/master/public/.htaccess - Htaccess File

nikolaposa/devpage/master/public/.htaccess

RewriteEngine On

# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

# Assets versioning
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+).(d+).(js|css|png|jpg|gif)$ $1.$3 [L]

# Ignore static content and don't redirect it to the app.
RewriteCond %{REQUEST_URI} ^(css|js|img|assets)/ [OR]
RewriteCond %{REQUEST_FILENAME} .(js|map|css|ico|gif|jpg|png|eot|svg|ttf|woff)$
RewriteRule ^.*$ - [NC,L]

# The following rewrites all other queries to index.php.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]

On Github License

Files

Download PDF of Htaccess file
ENV, REQUEST_FILENAME, REQUEST_URI, static

Comments

Apache