Merge branch 'develop' of https://github.com/friendica/friendica into develop
[friendica.git/.git] / .htaccess-dist
1 # This file is meant to be copied to ".htaccess" on Apache-powered web servers.
2 # The created .htaccess file can be edited manually and will not be overwritten by Friendica updates.
3
4 Options -Indexes
5 AddType application/x-java-archive .jar
6 AddType audio/ogg .oga
7 #AddHandler php53-cgi .php
8
9 # deny access to log files (friendica.log or php.out)
10 <FilesMatch "\.(out|log)$">
11   <IfModule authz_host_module>
12     #Apache 2.4
13     Require all denied
14   </IfModule>
15   <IfModule !authz_host_module>
16     #Apache 2.2
17     Deny from all
18   </IfModule>
19 </FilesMatch>
20
21 # deny access to backup files
22 <FilesMatch "(\~|\.bak|\.swp)$">
23   <IfModule authz_host_module>
24     #Apache 2.4
25     Require all denied
26   </IfModule>
27   <IfModule !authz_host_module>
28     #Apache 2.2
29     Deny from all
30   </IfModule>
31 </FilesMatch>
32
33 <IfModule mod_rewrite.c>
34   RewriteEngine on
35   # Protect repository directory from browsing
36   RewriteRule "(^|/)\.git" - [F]
37
38   # Rewrite current-style URLs of the form 'index.php?pagename=x'.
39   # Also place auth information into REMOTE_USER for sites running
40   # in CGI mode.
41
42   # If you have troubles or use VirtualDocumentRoot
43   # uncomment this and set it to the path where your friendica installation is
44   # i.e.:
45   # Friendica url: http://some.example.com
46   # RewriteBase /
47   # Friendica url: http://some.example.com/friendica
48   # RewriteBase /friendica/
49   #
50   #RewriteBase /
51
52   RewriteCond %{REQUEST_FILENAME} !-f
53   RewriteCond %{REQUEST_FILENAME} !-d
54   RewriteRule ^(.*)$ index.php?pagename=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA,B]
55
56 </IfModule>