update .htaccess

This commit is contained in:
Shannon Sterz 2017-07-07 13:46:34 +02:00
parent bc294977d2
commit 4fe0d78b20

View file

@ -2,13 +2,19 @@
# rewrite rules # rewrite rules
<IfModule mod_rewrite.c> <IfModule mod_rewrite.c>
Redirect 301 /.well-known/carddav /owncloud/remote.php/carddav
Redirect 301 /.well-known/caldav /owncloud/remote.php/caldav
# enable awesome urls. i.e.: # enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team # http://yourdomain.com/about-us/team
RewriteEngine on RewriteEngine on
RewriteCond %{HTTPS} !=on
# redirect all trafic to https
RewriteCond %{ENV:HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
Redirect 301 /.well-known/carddav /owncloud/remote.php/carddav
Redirect 301 /.well-known/caldav /owncloud/remote.php/caldav
# make sure to set the RewriteBase correctly # make sure to set the RewriteBase correctly
# if you are running the site in a subfolder. # if you are running the site in a subfolder.
# Otherwise links or the entire site will break. # Otherwise links or the entire site will break.
@ -36,7 +42,6 @@ RewriteRule ^panel/(.*) panel/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L] RewriteRule ^(.*) index.php [L]
</IfModule> </IfModule>
# Additional recommended values # Additional recommended values
@ -45,3 +50,6 @@ 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