Created
June 18, 2014 03:16
-
-
Save juji/a419eb24b8b9dbf68433 to your computer and use it in GitHub Desktop.
Apache common .htaccess
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Options -Indexes | |
Options +FollowSymLinks | |
IndexOptions +Charset=UTF-8 | |
RewriteEngine On | |
# forced domain | |
RewriteCond %{HTTP_HOST} !=paragon.local | |
RewriteRule ^.*$ paragon.local%{REQUEST_URI} [R,L] | |
# Hotlink prevention | |
RewriteCond %{HTTP_REFERER} !^$ | |
RewriteCond %{HTTP_REFERER} !^http(s)?://paragon\.local [NC] | |
RewriteCond %{HTTP_REFERER} !^http(s)?://admin\.paragon\.local [NC] | |
RewriteRule \.(jpg|jpeg|png|gif|css|js|ttf|woff|eot|otf|svg|htc)$ http://goo.gl/9iEL6d [NC,R,L] | |
# redirect all 404 to index | |
RewriteCond %{SCRIPT_FILENAME} !-d | |
RewriteCond %{SCRIPT_FILENAME} !-f | |
RewriteRule .* index.php [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment