forked from TheAmazingBrianPowell/Robotics-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
34 lines (22 loc) · 922 Bytes
/
.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
Satisfy Any
ErrorDocument 404 /error/404
ErrorDocument 403 /error/404
ErrorDocument 500 /error/500
RewriteEngine On
RewriteCond %{HTTP_HOST} rhs-robotics\.herokuapp\.com [NC]
RewriteRule ^ http://www.rhsrobotics.net%{REQUEST_URI} [NC,R=301,L]
#rewrites php files to directories
#RewriteCond %{REQUEST_FILENAME} \.php$ [NC]
#RewriteRule ^(https://rhs-robotics\.herokuapp\.com.*)\.php $1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [NC,L]
#rewrites files with html extension
#RewriteCond %{REQUEST_FILENAME} \.html$ [NC]
#RewriteRule ^(https://rhs-robotics\.herokuapp\.com.*)\.html $1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html [NC,L]
RewriteCond %{REQUEST_FILENAME}.pdf -f
RewriteRule ^(.*)$ $1.pdf [NC,L]
#rewrites http to https
#RewriteCond %{HTTP:X-Forwarded-Proto} !https
#RewriteRule ^ https://rhs-robotics.herokuapp.com%{REQUEST_URI} [L,R]