forked from berta-cms/berta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtaccess
61 lines (42 loc) · 2.28 KB
/
htaccess
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
56
57
58
59
60
61
#
# HOW TO USE THIS FILE?
#
# 1. After uploading all files to the server, renam this file on the server
# to ".htaccess" (excluding the quotes).
#
# 2. Modify the .htaccess file if you have installed berta in a subfolder
# on your server (e.g., not www.mysite.net, but www.mysite.net/berta).
# Scroll down to look for the places marked by asterisks (***).
#
# 3. Test, if your site works, by opening it in your browser. If you receive
# Server Error 500, then your server has problems parsing this file. Contact
# your hosting service and ask them to "allow mod_rewrite in .htaccess files".
#
<IfModule mod_rewrite.c>
RewriteEngine on
# CHANGABLE PART - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \
# *** Change the "/" to the name of the folder where you uploaded berta.
# E.g.: "/berta/" (without quotes), if you uploaded berta to the
# subfolder berta of the www root of your web server.
RewriteBase /
# *** In the following RewriteCond statements, change the part "^/" to include
# the name of the foler you uploaded berta to.
# E.g.: "^/berta/" (without quotes), if you uploaded berta to the
# subfolder berta of the www root of your web server.
# If you have folders or files inside berta's folder you wish to access directly,
# then modify and uncomment the following line
# RewriteCond %{REQUEST_URI} ^/(my_folder_name1|my_folder_name1|my_file.html).*$ [OR]
RewriteCond %{REQUEST_URI} ^/(_plugin_shop|engine|INSTALL|storage|templates).*$ [OR]
RewriteCond %{REQUEST_URI} ^/(index\.php|sitemap\.xml\.php|robots\.txt|crossdomain\.xml|favicon\.ico).*$
RewriteRule .* - [L]
# END OF CHANGABLE PART - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \
# DON'T CHANGE ANYTHING HERE!
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !index.php$
RewriteCond %{REQUEST_URI} !^(.*)/$
RewriteRule ^(.*)$ /$1/ [R=301,L]
# the content is fed to index.php, which handles it
RewriteRule ^.*$ index.php?__rewrite=1 [L]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /
</IfModule>