-
Notifications
You must be signed in to change notification settings - Fork 6
/
.htaccess
158 lines (145 loc) · 10.3 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<IfModule mod_rewrite.c>
RewriteEngine On
## Redirecting anything formerly under "Projects" to /
RewriteRule ^Projects(.*)$ / [R=301,L]
## Begin RewriteBase
# If you are getting 500 or 404 errors on subpages, you may have to uncomment the RewriteBase entry
# You should change the '/' to your appropriate subfolder. For example if you have
# your Grav install at the root of your site '/' should work, else it might be something
# along the lines of: RewriteBase /<your_sub_folder>
##
# RewriteBase /
## End - RewriteBase
## Begin - X-Forwarded-Proto
# In some hosted or load balanced environments, SSL negotiation happens upstream.
# In order for Grav to recognize the connection as secure, you need to uncomment
# the following lines.
#
# RewriteCond %{HTTP:X-Forwarded-Proto} https
# RewriteRule .* - [E=HTTPS:on]
#
## End - X-Forwarded-Proto
## Begin - Exploits
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Grav
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Exploits
## Begin - Index
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
## End - Index
## Begin - Security
# Block all direct access for these folders
RewriteRule ^(\.git|cache|bin|logs|backup|webserver-configs|tests)/(.*) error [F]
# Block access to specific file types for these system folders
RewriteRule ^(system|vendor)/(.*)\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ error [F]
# Block access to specific file types for these user folders
RewriteRule ^(user)/(.*)\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ error [F]
# Block all direct access to .md files:
RewriteRule \.md$ error [F]
# Block all direct access to files and folders beginning with a dot
RewriteRule (^|/)\.(?!well-known) - [F]
# Block access to specific files in the root folder
RewriteRule ^(LICENSE\.txt|composer\.lock|composer\.json|\.htaccess)$ error [F]
## End - Security
</IfModule>
# Begin - Prevent Browsing and Set Default Resources
Options -Indexes
DirectoryIndex index.php index.html index.htm
# End - Prevent Browsing and Set Default Resources
Redirect 301 /Blueprints/wordpress_toctree.html /working-with-subutai/blueprints
Redirect 301 /Blueprints/blockchain-in-a-box/Introduction.html /working-with-subutai/blueprints/tutorials
Redirect 301 /Blueprints/blockchain-in-a-box/Wizard-Configuration-Parameters.html /working-with-subutai/blueprints/tutorials
Redirect 301 /Blueprints/blockchain-in-a-box_toctree.html /working-with-subutai/blueprints/tutorials
Redirect 301 /Blueprints/FAQ_hackathon_toctree.html /working-with-subutai/blueprints/create-blueprints
Redirect 301 /Blueprints/wordpress-standalone_toctree.html /working-with-subutai/blueprints
Redirect 301 /Blueprints/Guides_hackathon_toctree.html /working-with-subutai/blueprints/create-tutorials
Redirect 301 /Blueprints/Guides_blockchain-in-a-box_toctree.html /working-with-subutai/blueprints/tutorials
Redirect 301 /Blueprints/hackathon/What-is-a-blueprint.html /working-with-subutai/blueprints
Redirect 301 /Blueprints/hackathon/Who-can-participate-and-when.html /working-with-subutai/blueprints/tutorials
Redirect 301 /Blueprints/hackathon/What-is-the-Subutai-Horde.html /working-with-subutai/blueprints/create-blueprints
Redirect 301 /Blueprints/hackathon/Why-are-blueprints-needed.html /working-with-subutai/blueprints
Redirect 301 /Blueprints/hackathon/Using-Subutai-Blueprints.html /working-with-subutai/blueprints/using-blueprints
Redirect 301 /Blueprints/hackathon/Writing-Subutai-Blueprints.html /working-with-subutai/blueprints/create-blueprints
Redirect 301 /Blueprints/hackathon/How-does-it-work.html /working-with-subutai/blueprints/create-blueprints
Redirect 301 /Blueprints/hackathon/Branding-Features.html /working-with-subutai/blueprints/create-blueprints
Redirect 301 /Blueprints/hackathon/How-can-I-sign-up.html /working-with-subutai/blueprints/create-blueprints
Redirect 301 /Blueprints/hackathon/What-is-a-Subutai-Peer.html /glossary#peer
Redirect 301 /Blueprints/hackathon/Contest-Legal-Notice.html /working-with-subutai/blueprints/create-blueprints
Redirect 301 /Blueprints/hackathon/What-is-the-hackathon-about.html /working-with-subutai/blueprints/create-blueprints
Redirect 301 /Blueprints/hackathon/Contest-Rules.html /working-with-subutai/blueprints/create-blueprints
Redirect 301 /Blueprints/hackathon/External-Resources.html /working-with-subutai/blueprints/create-blueprints
Redirect 301 /Blueprints/hackathon/What-is-"GoodWill".html /glossary#good-will
Redirect 301 /Blueprints/hackathon/What-is-the-Subutai-Snap.html /
Redirect 301 /Blueprints/hackathon/Prizes.html /working-with-subutai/blueprints/create-blueprints
Redirect 301 /Blueprints/hackathon/What-is-a-Subutai-Environment.html /glossary#environment
Redirect 301 /Blueprints/mattermost_toctree.html /working-with-subutai/blueprints
Redirect 301 /Blueprints/hackathon_toctree.html /working-with-subutai/blueprints/create-blueprints
Redirect 301 /search.html /search
Redirect 301 /Subutai_Use_Cases.html /introduction/about-platform
Redirect 301 /Glossary.html /glossary
Redirect 301 /About.html /introduction/about-documentations
Redirect 301 /Products/Bazaar/26_Users.html /working-with-subutai/using-bazaar/bazaar-tools/users
Redirect 301 /Products/Bazaar/13_Cloud_accounts.html /working-with-subutai/using-bazaar/use-account-tools#cloud-accounts
Redirect 301 /Products/Bazaar/27_E2E_plugin.html /software-components/e2e-plugin
Redirect 301 /Products/Bazaar/03_Billing_Info.html /working-with-subutai/using-bazaar/use-account-tools#billing
Redirect 301 /Products/Bazaar/18_How_to_create_and_use_environments.html /working-with-subutai/using-bazaar/using-bazaar-tools/create-environments
Redirect 301 /Products/Bazaar/11_Organizations_user.html /working-with-subutai/using-bazaar/use-account-tools#organizations
Redirect 301 /Products/Bazaar/08_Application_settings.html /working-with-subutai/using-bazaar/use-account-tools#application-settings
Redirect 301 /Products/Bazaar/12_GitHub_Projects.html /working-with-subutai/using-bazaar/use-account-tools#my-blueprints
Redirect 301 /Products/Bazaar/14_Friends_page.html /working-with-subutai/using-bazaar/use-account-tools#friends
Redirect 301 /Products/Bazaar/10_CDN.html /working-with-subutai/using-bazaar/use-account-tools#cdn
Redirect 301 /Products/Bazaar/05_Domains.html /working-with-subutai/using-bazaar/use-account-tools#domains
Redirect 301 /Products/Bazaar/06_Products.html /working-with-subutai/using-bazaar/using-bazaar-tools/use-products-blueprints
Redirect 301 /Products/Bazaar/09_Invitations_and_Coupons.html /working-with-subutai/using-bazaar/use-account-tools#invitations-and-coupons
Redirect 301 /Products/Bazaar/24_Products.html /working-with-subutai/using-bazaar/using-bazaar-tools/use-products-blueprints
Redirect 301 /Products/Bazaar/16_Chat_notifications_balance.html /working-with-subutai/using-bazaar/get-to-know
Redirect 301 /Products/Bazaar/21_Peers.html /working-with-subutai/using-bazaar/using-bazaar-tools/select-peers
Redirect 301 /Products/Bazaar/15_Application_logs.html /working-with-subutai/using-bazaar/using-bazaar-tools/use-products-blueprints
Redirect 301 /Products/Bazaar/23_Remote_Desktop.html /working-with-subutai/using-bazaar
Redirect 301 /Products/Bazaar/01_Subutai_Bazaar.html /working-with-subutai/using-bazaar
Redirect 301 /Products/Bazaar/19_How_to_use_AppScale.html /working-with-subutai/using-bazaar
Redirect 301 /Products/Bazaar/07_SSH_key_management.html /working-with-subutai/using-bazaar/use-account-tools#ssh-key-management
Redirect 301 /Products/Bazaar/17_Environments.html /working-with-subutai/using-bazaar/using-bazaar-tools/create-environments
Redirect 301 /Products/Bazaar/20_War_room.html /working-with-subutai/using-bazaar
Redirect 301 /Products/Bazaar/04_Peers_page_user_menu.html /working-with-subutai/using-bazaar/use-account-tools#my-peers
Redirect 301 /Products/Bazaar/02_User_Profile_Account_Settings.html /working-with-subutai/using-bazaar/use-account-tools#settings
Redirect 301 /Products/Bazaar/25_Map_of_peers.html /working-with-subutai/using-bazaar
Redirect 301 /Products/Bazaar_toctree.html /working-with-subutai/using-bazaar
Redirect 301 /Products/Router/Cloud_Router_and_IoT_Gateway.html /
Redirect 301 /Products/Router/Specifications.html /
Redirect 301 /Products/Router/About_Blockchain_Router.html /
Redirect 301 /Products/PeerOS_toctree.html /working-with-subutai/using-peeros
Redirect 301 /Products/PeerOS/04_Post-installation.html /working-with-subutai/using-peeros
Redirect 301 /Products/PeerOS/05_How_to_use_the_Subutai_Console.html /software-components/management-console
Redirect 301 /Products/PeerOS/08_Using_Environments.html /working-with-subutai/using-peeros
Redirect 301 /Products/PeerOS/02_Install_PeerOS.html /working-with-subutai/using-peeros/peeros-advanced-install
Redirect 301 /Products/PeerOS/07_How_to_update_Subutai_components.html /working-with-subutai/using-peeros/manage-peers#Update-resource-hosts
Redirect 301 /Products/PeerOS/03_Run_PeerOS_with_Vagrant.html /working-with-subutai/using-peeros/peeros-quick-install
Redirect 301 /Products/PeerOS/01_What_is_the_PeerOS.html /working-with-subutai/using-peeros
Redirect 301 /Products/PeerOS/06_How_to_use_Control_Center_and_P2P.html /software-components
Redirect 301 /Products/Router_toctree.html /
Redirect 301 /Support.html /support
Redirect 301 /Quick_Start.html /working-with-subutai
Redirect 301 /Resources/Resources_toctree.html /
Redirect 301 /Roadmap.html /
Redirect 301 /Contributing.html /
Redirect 301 /FAQ.html /faqs