This repository was archived by the owner on Oct 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.htaccess
More file actions
55 lines (42 loc) · 1.53 KB
/
.htaccess
File metadata and controls
55 lines (42 loc) · 1.53 KB
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
50
51
52
53
54
55
#
# Apache/PHP/CloudEngine settings.
#
# Protect files and directories.
<FilesMatch "\.(.*sql|orig)$|^\.(hg|git)">
Order allow,deny
</FilesMatch>
# Don't show directory listings. Follow symbolic links.
Options -Indexes
Options +FollowSymLinks
# Set the default handler.
DirectoryIndex index.php
# Error message for non-existent favicon. (Apache 1.3, no end quote.)
<Files favicon.ico>
ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>
<IfModule mod_rewrite.c>
RewriteEngine on
# Restrict your site to one domain.
#RewriteCond %{HTTP_HOST} !^example\.org$
#RewriteRule ^(.*)$ http://example.org/$1 [L]
# Legacy paths.
RewriteRule user/(login|logout|register) auth/$1 [QSA,L]
RewriteRule user/(activation/.*) auth/$1 [QSA,L]
RewriteRule user/(forgotten_password|change_password) auth/$1 [QSA,L]
RewriteRule user/(forgotten_password_reset) auth/$1 [QSA,L]
RewriteRule news/view/(.*) blog/view/$1 [QSA,L]
# Suggestions API - ?term=X
RewriteRule api/suggest/users(.*) message/get_message_recipients [QSA,L]
# Protect scripts.
RewriteCond %{REQUEST_FILENAME} !index.php
RewriteRule (.*)\.php$ index.php/$1 [L]
# Protect hidden files.
RewriteRule ^\.(hg|git).*$ index.php/_403_ [QSA,L]
# Finally, point to the front controller.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>