forked from armchairdeity/MuraCMS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
htaccess.txt
executable file
·53 lines (42 loc) · 1.97 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
# 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
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Rewrite only nonexistent file or directory path
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# -------------------------------------------------------------------------------
# MURA REWRITE OPTIONS
#
# NOTE: If running on Tomcat with sites using the SiteID in the URL
# a custom servlet mapping will be required for each site.
# Instructions: http://docs.getmura.com/v6/installation-setup/how-to-add-a-servlet-mapping-for-your-siteid-to-tomcat/
# -------------------------------------------------------------------------------
# The same rewrite rule actually applies in either option listed below
# However, configuration of the `settings.ini.cfm` file may vary
# OPTION 1 :: WITHOUT SiteID
# In /config/settings.ini.cfm, set both siteidinurls and indexfileinurls to 0
# and reload the Mura application
# OPTION 2 :: WITH SiteID
# In /config/settings.ini.cfm, set indexfileinurls to 0
RewriteRule ^(.*) /index.cfm/$1 [NC,QSA,PT]
# 404 :: Redirect to 404.cfm with the requested URI as a query string
# This assumes a custom file named 404.cfm exists in your root directory
#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
<FilesMatch ".(eot|ttf|otf|woff|js)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>