trying htaccess to prevent access to certain content

This commit is contained in:
asus
2024-06-08 11:13:53 +02:00
parent c08dff5171
commit d9a6269f13
13 changed files with 11 additions and 0 deletions

View File

@@ -2,3 +2,14 @@
RewriteEngine On RewriteEngine On
RewriteCond %{HTTPS} off RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
# denying access
# https://stackoverflow.com/questions/8217430/how-to-redirect-only-when-exact-url-matches
RedirectMatch 403 ^/docs/?$
RedirectMatch 403 ^/styles/?$
RedirectMatch 403 ^/styles/.*$
#RedirectMatch 403 ^/.git/?$
RedirectMatch 403 ^/README.md$
RedirectMatch 403 ^/alphabet.txt$
#RedirectMatch 403 ^/.htaccess$
RedirectMatch 403 ^/.gitignore$

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.