-
Notifications
You must be signed in to change notification settings - Fork 57
/
.htaccess
36 lines (30 loc) · 1.23 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
RewriteEngine On
RewriteBase /personal/applications/phppickem/
# 301 REDIRECTS
# redirect 301 /links.php http://www.domain.com/api-companies.php
# RewriteRule ^links.php$ api-companies.php [L,R=301]
# rewrite all index files to folder root
#RewriteCond %{THE_REQUEST} /index\.html [NC]
#RewriteRule ^(.*/)?index\.html$ $1 [R=301,L]
#RewriteCond %{THE_REQUEST} /index\.php [NC]
#RewriteRule ^(.*/)?index\.php$ $1 [R=301,L]
# strip php file extensions
# RewriteRule ^admin - [L,NC]
# RewriteRule ^os2 - [L,NC]
# RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+\.)+php?\ HTTP
# RewriteRule ^(.*)\.php$ $1 [R=301,L]
# redirect all traffic to the www domain (if applicable)
# RewriteCond %{HTTP_HOST} !^www\.
# RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
# redirect all traffic to the primary domain (if applicable)
# RewriteCond %{HTTP_HOST} !^www\.domain\.com
# RewriteRule ^(.*)$ http://www\.domain\.com/$1 [R=301,L]
# display php files without file extensions
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
# ERROR DOCUMENTS
# ErrorDocument 404 /404.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ 404.php [L]