i have a folder that name is admin in root of laravel project.and there is js, css, images and fonts in that folder.Now how can i deny other's to access that folder in laravel?
Asked
Active
Viewed 973 times
-1
-
http://stackoverflow.com/questions/19118482/deny-access-to-one-specific-folder-in-htaccess – linktoahref Apr 04 '17 at 06:19
-
4Possible duplicate of [Deny access to one specific folder in .htaccess](http://stackoverflow.com/questions/19118482/deny-access-to-one-specific-folder-in-htaccess) – linktoahref Apr 04 '17 at 06:20
-
i can't do it with these are!!! – Mr Code Apr 04 '17 at 08:10
1 Answers
0
i solve it with this code in htaccess:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteRule ^admin(.*)/$ /$1 [L,R=301] //this line is for admin folder access limitation
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Mr Code
- 43
- 6