]> git.immae.eu Git - github/shaarli/Shaarli.git/blame_incremental - .htaccess
Merge tag 'v0.12.1' into latest
[github/shaarli/Shaarli.git] / .htaccess
... / ...
CommitLineData
1# Disable directory listing
2Options -Indexes
3
4RewriteEngine On
5
6# Prevent accessing subdirectories not managed by SCM
7RewriteRule ^(.git|doxygen|vendor) - [F]
8
9# Forward the "Authorization" HTTP header
10# fixes JWT token not correctly forwarded on some Apache/FastCGI setups
11RewriteCond %{HTTP:Authorization} ^(.*)
12RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
13# Alternative (if the 2 lines above don't work)
14# SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
15
16# Slim URL Redirection
17# Ionos Hosting needs RewriteBase /
18# RewriteBase /
19RewriteCond %{REQUEST_FILENAME} !-f
20RewriteCond %{REQUEST_FILENAME} !-d
21RewriteRule ^ index.php [QSA,L]
22
23<LimitExcept GET POST PUT DELETE PATCH OPTIONS>
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>
35 Require all denied
36 </IfModule>
37</LimitExcept>