-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
<Files .env> | ||
Order allow,deny | ||
Deny from all | ||
</Files> | ||
|
||
<Directory admin> | ||
Order allow,deny | ||
allow from 90.63.182.86 | ||
allow from 217.128.58.80 | ||
Deny from all | ||
</Directory> | ||
# Turn on rewrite engine | ||
RewriteEngine On | ||
|
||
# Block access to the .env file | ||
RewriteCond %{REQUEST_URI} ^/.env | ||
RewriteRule ^ - [F] | ||
|
||
# Restrict access to the admin directory, allow only two specific IPs | ||
RewriteCond %{REQUEST_URI} ^/admin | ||
RewriteCond %{REMOTE_ADDR} !^90\.63\.182\.86$ | ||
RewriteCond %{REMOTE_ADDR} !^217\.128\.58\.80$ | ||
RewriteRule ^ - [F] | ||
|
||
# Block access to specific code directories | ||
RewriteCond %{REQUEST_URI} ^/(app|migration|vendor)/ | ||
RewriteRule ^ - [F] | ||
|
||
# Disable directory listings | ||
Options -Indexes |