forked from novius-os/novius-os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess.shared-hosting
55 lines (40 loc) · 2.04 KB
/
.htaccess.shared-hosting
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
# NOVIUS OS - Web OS for digital communication
#
# @copyright 2011 Novius
# @license GNU Affero General Public License v3 or (at your option) any later version
# http://www.gnu.org/licenses/agpl-3.0.html
# @link http://www.novius-os.org
Options +FollowSymLinks -Indexes
# Replace novius-os-install-dir by the real Novius OS installed directory
ErrorDocument 404 /novius-os-install-dir/public/htdocs/novius-os/404.php
<IfModule mod_version.c>
<IfVersion >= 2.4>
DirectoryIndex disabled
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
DirectoryIndex disabled
</IfModule>
## Post-installation optimisation
#<IfModule xsendfile_module>
#XSendFile On
## Replace "novius-os-install-dir" by the real Novius OS installed directory
#XSendFilePath /novius-os-install-dir/local/data
#</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
# Entry point for back-office controller URL
RewriteRule ^(admin(|/.*))$ public/htdocs/novius-os/admin.php [QSA,PT]
# Entry point for front office
RewriteRule ^([^\.]*)$ public/htdocs/novius-os/front.php [QSA,PT]
RewriteRule ^.+(\.html|/)$ public/htdocs/novius-os/front.php [QSA,PT]
# Novius OS is not installed, redirect to install
RewriteCond !%{DOCUMENT_ROOT}/novius-os-install-dir/public/htdocs/novius-os/front.php -f
RewriteRule ^public/htdocs/novius-os/front.php /novius-os-install-dir/install.php [R,L]
# do nothing for URL begining with a folder in public/(static|cache|media|data|htdocs)
RewriteRule ^public/(static|cache|media|data|htdocs)/ - [L]
# Redirect URL not begining with public folder to public
RewriteRule ^(static|cache|media|data|htdocs)/(.*) public/$1/$2 [L]
# Abstraction of htdocs directory in public
RewriteRule ^(.*) public/htdocs/$1 [L]
</IfModule>