]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - .htaccess
Merge pull request #1698 from ArthurHoaro/feature/plugins-search-filter
[github/shaarli/Shaarli.git] / .htaccess
CommitLineData
cabf1b6b
V
1# Disable directory listing
2Options -Indexes
3
18e67967 4RewriteEngine On
cabf1b6b
V
5
6# Prevent accessing subdirectories not managed by SCM
7RewriteRule ^(.git|doxygen|vendor) - [F]
8
460cf03d 9# Forward the "Authorization" HTTP header
91a21c27 10# fixes JWT token not correctly forwarded on some Apache/FastCGI setups
460cf03d
V
11RewriteCond %{HTTP:Authorization} ^(.*)
12RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
676571da
CS
13# Alternative (if the 2 lines above don't work)
14# SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
460cf03d 15
8a979601 16# Slim URL Redirection
676571da
CS
17# Ionos Hosting needs RewriteBase /
18# RewriteBase /
18e67967
A
19RewriteCond %{REQUEST_FILENAME} !-f
20RewriteCond %{REQUEST_FILENAME} !-d
21RewriteRule ^ index.php [QSA,L]
6410bf96 22
4488ea4b 23<LimitExcept GET POST PUT DELETE PATCH OPTIONS>
8aca613b
A
24 <IfModule version_module>
25 <IfVersion >= 2.4>
26 Require all denied
27 </IfVersion>
28 <IfVersion < 2.4>
29 Allow from none
30 Deny from all
31 </IfVersion>
32 </IfModule>
33
34 <IfModule !version_module>
6410bf96 35 Require all denied
8aca613b 36 </IfModule>
6410bf96 37</LimitExcept>