Simplified code
[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 <FilesMatch "\.(out|log)$">
10   <IfModule authz_host_module>
11     #Apache 2.4
12     Require all denied
13   </IfModule>
14   <IfModule !authz_host_module>
15     #Apache 2.2
16     Deny from all
17   </IfModule>
18 </FilesMatch>
19
20 <IfModule mod_rewrite.c>
21   RewriteEngine on
22   # Protect repository directory from browsing
23   RewriteRule "(^|/)\.git" - [F]
24
25   # Rewrite current-style URLs of the form 'index.php?pagename=x'.
26   # Also place auth information into REMOTE_USER for sites running
27   # in CGI mode.
28
29   # If you have troubles or use VirtualDocumentRoot
30   # uncomment this and set it to the path where your friendica installation is
31   # i.e.:
32   # Friendica url: http://some.example.com
33   # RewriteBase /
34   # Friendica url: http://some.example.com/friendica
35   # RewriteBase /friendica/
36   #
37   #RewriteBase /
38
39   RewriteCond %{REQUEST_FILENAME} !-f
40   RewriteCond %{REQUEST_FILENAME} !-d
41   RewriteRule ^(.*)$ index.php?pagename=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
42
43 </IfModule>