forked from armchairdeity/MuraCMS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtaccess.txt
56 lines (39 loc) · 1.94 KB
/
htaccess.txt
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
# Apache mod_rewrite Docs: http://httpd.apache.org/docs/current/rewrite/
# Intro: http://httpd.apache.org/docs/current/rewrite/intro.html
# Flags: http://httpd.apache.org/docs/current/rewrite/flags.html
Options All -Indexes
Options +FollowSymLinks
# -------------------------------------------------------------------------------
# MURA REWRITE OPTIONS
# -------------------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Is the request for a non-existent file or non-existent directory?
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# OPTION 1 :: WITHOUT SiteID
# Set both siteIDInURLS and indexFileInURLs to 0 in your
# /config/setting.ini.cfm and reload Mura
RewriteRule ^([a-zA-Z0-9/].+)$ /index.cfm/$1 [NC,QSA,PT]
# OPTION 2 :: WITH SiteID
# Set indexFileInURLs to 0 in your /config/setting.ini.cfm and reload Mura.
#RewriteRule ^([a-zA-Z0-9]{1,})/([a-zA-Z0-9/].+)$ /$1/index.cfm/$2 [NC,QSA,PT]
# OPTION 3 :: Advanced Configuration ::
# IF you want to have SiteID for SPECIFIC SITES ONLY, but not all of them
# you need to add a custom getURLStem() method to the Site's contentRenderer.cfc
# Then, you need to ENABLE OPTION 1 above, and add a custom rewrite rule for each site:
#RewriteRule ^YourSiteID/(.*) /YourSiteID/index.cfm/$1 [NC,QSA,PT]
# 404 :: Pass the requested URI as a query string
# This assumes you have a custom 404.cfm file at the root of your site
#RewriteRule (.*) 404.cfm?%{REQUEST_URI}?%{QUERY_STRING}
# Forbid executable files from being downloaded
RewriteRule \.exe - [F]
</IfModule>
# -------------------------------------------------------------------------------
# UTF-8 encoding
# -------------------------------------------------------------------------------
# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8
# Force UTF-8 for a number of file formats
AddCharset utf-8 .css .js .xml .json .rss .atom