-
Notifications
You must be signed in to change notification settings - Fork 16
/
.htaccess.dist
49 lines (36 loc) · 1.55 KB
/
.htaccess.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# RESTfm .htaccess file for use with Apache 2.2 and 2.4.
Options -Indexes
DirectoryIndex index.html
<IfModule mod_rewrite.c>
RewriteEngine On
# Workaround for Apache 2.4.0 < 2.4.9 bug where RewriteRule is overridden
# by DirectoryIndex. i.e. index.html will always be loaded no matter what
# RewriteRules say! Setting DirectoryIndex disabled can cause confusion
# where RESTfm redirection is not functioning properly yet. Always check
# http://<your_server>/RESTfm/report.php
#DirectoryIndex disabled
# Uncomment to enforce SSL with redirect.
#RewriteCond %{HTTPS} !=on
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Work around for HTTP Basic Auth for Apache CGI/FCGI/suExec server modes.
RewriteRule ".*" - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Block access to .svn directories.
RewriteRule ".*\.svn/.*" - [F]
# Block access to .git directory.
RewriteRule ".*\.git/.*" - [F]
# Block access to .gitignore.
RewriteRule ".*\.gitignore" - [F]
# Block access to .htaccess files.
RewriteRule "(^|/)\.htaccess" - [F]
# Block access to all .ini files
RewriteRule "\.ini$" - [F]
# Set RewriteBase if RESTfm is in a subdirectory.
# Must also set baseURI in RESTfm.ini
# Example for: http://example.com/~user/RESTfm
# would be: RewriteBase /~user/RESTfm
RewriteBase /RESTfm
# Redirect all URLs to RESTfm.php
RewriteCond %{REQUEST_URI} !RESTfm\.php$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ".*" RESTfm.php [L,QSA]
</IfModule>