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]
|
|
|
|
RewriteRule ^(.*)?\.yml$ - [F,L]
|
|
|
|
Rewriterule ^(.*)?\.yaml$ - [F,L]
|
|
|
|
RewriteRule ^(.*/)?\.git+ - [F,L]
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
# Remove the index.php
|
|
|
|
RewriteCond %{REQUEST_URI} !^/index\.php
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteRule ^ index.php [QSA,L]
|