-
Notifications
You must be signed in to change notification settings - Fork 2
/
.htaccess
41 lines (36 loc) · 1.4 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
# ------------------------------------ #
# bluwild.us rewrite directives #
# ------------------------------------ #
Options +FollowSymLinks
#FallbackResource /index.html
# ----------------------------------------------- #
# SEO - Hash Bang & HTML5 Mode rewrite directives #
# ----------------------------------------------- #
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=/?(.*)$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/snapshots/%1? [NC,L]
#RewriteRule ^(.*)$ /snapshots/%1? [NC,L]
# NOTE: When the browser calls http://bluewild.us/courses/, apache is attempting
# to serve the index page of http://bluewild.us/coourses/, which it cannot find
# and therefore throws a 404 error. Below is a rewrite rule to rewrite the links
# to the root index page.
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /index.html
# ------------------------- #
# NOTES: rewrite directives #
# --------------------------#
# http://httpd.apache.org/docs/2.2/rewrite/intro.html
#
# [NC,L] explained: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
#
# nocase|NC (no case)
# This makes the Pattern case-insensitive
#
# last|L (last rule)
# Stop the rewriting process here and don't apply any more rewrite rules.
#
# %1 Refers to a pattern matched in a RewriteCond condition,
# while $1 refers to a pattern matched inside a RewriteRule.