Fórum Root.cz
Hlavní témata => Server => Téma založeno: MoneyManager 09. 02. 2016, 11:02:24
-
Zdravim vo spolok.
Moj hosting zacal podporovat Let's Encrypt. Vygeneroval som certifikat a funguje to skvele. Problem je ze netusim ako zmenit v .htaccess zmenit nastavenie tak aby vsetko smerovalo na https namiesto http.
AddType video/mp4 .mp4
#Options -MultiViews
#Options -Indexes
<IfModule mod_rewrite.c>
## Uncomment (remove # ONLY NOT ##) line below if installed in folder and add folder name after /
## Example: Script is installed in /public_html/folder/ then it should be: Rewritebase /folder/
## Then the files below should be (add slash to all): /index.php?action=$1
## Uncomment the code below to Use PHP 5.4
# AddHandler application/x-httpd-php54 .php
RewriteEngine On
## Uncomment the following line to use the multi-domain feature
# RewriteCond %{HTTP_HOST} ^yourseconddomain\.com$ [NC]
# RewriteRule ^(.*)$ http://yourfirstdomain.com/$1 [R=301,L]
#Rewritebase /
## Admin Panel
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^admin/(.*)?$ admin/index.php?a=$1 [QSA,NC,L]
## Application Handler
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)?$ index.php?a=$1 [QSA,NC,L]
</IfModule>
## Error 404 ##
ErrorDocument 404 /index.php?a=404
Toto je moj .htaccess. Dakujem za rady
-
Já to dělám takhle: https://wiki.apache.org/httpd/RedirectSSL (https://wiki.apache.org/httpd/RedirectSSL)
-
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
-
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
doporučuji to samé