2017-04-14 21:45:15 +02:00
|
|
|
RewriteEngine On
|
|
|
|
|
|
|
|
# If your homepage is http://yourdomain.com/yoursite
|
|
|
|
# Set the RewriteBase to:
|
|
|
|
# RewriteBase /yoursite
|
|
|
|
|
|
|
|
# In some environements, an empty RewriteBase is required:
|
|
|
|
# RewriteBase /
|
|
|
|
|
|
|
|
# Protect your system files from prying eyes
|
|
|
|
RewriteRule ^(system\/author\/) - [L]
|
|
|
|
RewriteRule ^(system) - [F,L]
|
|
|
|
RewriteRule ^(content) - [F,L]
|
2017-07-02 19:18:48 +02:00
|
|
|
RewriteRule ^(settings) - [F,L]
|
2017-04-14 21:45:15 +02:00
|
|
|
RewriteRule ^(.*)?\.yml$ - [F,L]
|
|
|
|
Rewriterule ^(.*)?\.yaml$ - [F,L]
|
2017-05-01 21:44:33 +02:00
|
|
|
RewriteRule ^(.*)?\.txt$ - [F,L]
|
|
|
|
RewriteRule ^(.*)?\.example$ - [F,L]
|
2017-04-14 21:45:15 +02:00
|
|
|
RewriteRule ^(.*/)?\.git+ - [F,L]
|
|
|
|
|
2018-02-28 21:03:59 +01:00
|
|
|
# Use this to redirect HTTP to HTTPS on apache servers
|
|
|
|
# RewriteCond %{HTTPS} off
|
|
|
|
# RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
|
|
|
|
2017-04-14 21:45:15 +02:00
|
|
|
# Use this to redirect www to non-wwww on apache servers
|
2017-04-14 22:06:58 +02:00
|
|
|
# RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
|
|
|
|
# RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
|
2017-04-14 21:45:15 +02:00
|
|
|
|
2018-04-18 19:49:12 +02:00
|
|
|
# Use this to redirect slash/ to no slash urls on apache servers
|
|
|
|
# RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
# RewriteRule ^(.*)/$ /$1 [R=301,L]
|
|
|
|
|
2018-02-28 21:03:59 +01:00
|
|
|
# Removes index.php
|
|
|
|
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
|
|
|
|
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
|
|
|
|
|
|
|
|
# Directs all web requests through the site index file
|
2017-04-14 21:45:15 +02:00
|
|
|
RewriteCond %{REQUEST_URI} !^/index\.php
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteRule ^ index.php [QSA,L]
|