update .htaccess
This commit is contained in:
parent
bc294977d2
commit
4fe0d78b20
1 changed files with 36 additions and 28 deletions
64
.htaccess
64
.htaccess
|
@ -2,41 +2,46 @@
|
||||||
|
|
||||||
# rewrite rules
|
# rewrite rules
|
||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
Redirect 301 /.well-known/carddav /owncloud/remote.php/carddav
|
# enable awesome urls. i.e.:
|
||||||
Redirect 301 /.well-known/caldav /owncloud/remote.php/caldav
|
# http://yourdomain.com/about-us/team
|
||||||
|
RewriteEngine on
|
||||||
|
|
||||||
# enable awesome urls. i.e.:
|
RewriteCond %{HTTPS} !=on
|
||||||
# http://yourdomain.com/about-us/team
|
|
||||||
RewriteEngine on
|
|
||||||
|
|
||||||
# make sure to set the RewriteBase correctly
|
# redirect all trafic to https
|
||||||
# if you are running the site in a subfolder.
|
RewriteCond %{ENV:HTTPS} !=on
|
||||||
# Otherwise links or the entire site will break.
|
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
|
||||||
#
|
|
||||||
# If your homepage is http://yourdomain.com/mysite
|
|
||||||
# Set the RewriteBase to:
|
|
||||||
#
|
|
||||||
# RewriteBase /mysite
|
|
||||||
|
|
||||||
# block text files in the content folder from being accessed directly
|
Redirect 301 /.well-known/carddav /owncloud/remote.php/carddav
|
||||||
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
|
Redirect 301 /.well-known/caldav /owncloud/remote.php/caldav
|
||||||
|
|
||||||
# block all files in the site folder from being accessed directly
|
# make sure to set the RewriteBase correctly
|
||||||
RewriteRule ^site/(.*) index.php [L]
|
# if you are running the site in a subfolder.
|
||||||
|
# Otherwise links or the entire site will break.
|
||||||
|
#
|
||||||
|
# If your homepage is http://yourdomain.com/mysite
|
||||||
|
# Set the RewriteBase to:
|
||||||
|
#
|
||||||
|
# RewriteBase /mysite
|
||||||
|
|
||||||
# block all files in the kirby folder from being accessed directly
|
# block text files in the content folder from being accessed directly
|
||||||
RewriteRule ^kirby/(.*) index.php [L]
|
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
|
||||||
|
|
||||||
# make panel links work
|
# block all files in the site folder from being accessed directly
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteRule ^site/(.*) index.php [L]
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
|
||||||
RewriteRule ^panel/(.*) panel/index.php [L]
|
|
||||||
|
|
||||||
# make site links work
|
# block all files in the kirby folder from being accessed directly
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteRule ^kirby/(.*) index.php [L]
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
|
||||||
RewriteRule ^(.*) index.php [L]
|
|
||||||
|
|
||||||
|
# make panel links work
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule ^panel/(.*) panel/index.php [L]
|
||||||
|
|
||||||
|
# make site links work
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule ^(.*) index.php [L]
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
# Additional recommended values
|
# Additional recommended values
|
||||||
|
@ -44,4 +49,7 @@ RewriteRule ^(.*) index.php [L]
|
||||||
#
|
#
|
||||||
# AddDefaultCharset UTF-8
|
# AddDefaultCharset UTF-8
|
||||||
#
|
#
|
||||||
# php_flag short_open_tag on
|
# php_flag short_open_tag on
|
||||||
|
|
||||||
|
RequestHeader set X-Forwarded-Proto https
|
||||||
|
RequestHeader set X-Forwarded-Ssl on
|
||||||
|
|
Loading…
Reference in a new issue