Last active
October 24, 2016 10:21
-
-
Save shavidzet/f00f43a8054a13775ded6861eb07f90d to your computer and use it in GitHub Desktop.
Access website without public directory
This file contains hidden or 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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)/$ /$1 [L,R=301] | |
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC] | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^ index.php [L] | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} !^/public/ | |
RewriteRule ^(css|js|images)/(.*)$ public/$1/$2 [L,NC] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment