2017-01-19, 05:48 AM
(This post was last modified: 2017-01-19, 06:23 AM by Michael2014.)
Hi guys, so I read the docs on SSL and my site SSL works when I add the "s" to https and every page comes up SSL afterwards
but SSL doesn't work when I just use example.com
I have two files that are:
htaccess-nginx.text
htaccess.text
the file that is htaccess-nginx.text I didn't touch
but the file that is htaccess.text, I added
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
directly under this text that was already in the file:
<IfModule mod_rewrite.c>
RewriteEngine On
..................................................
now the htaccess-nginx.text looks like
Any idea what I can do to force example.com to become SSL?
The weird thing is, when I click the logo, the page becomes SSL: https://example/index.php
and all pages are ssl afterwards.
but SSL doesn't work when I just use example.com
I have two files that are:
htaccess-nginx.text
htaccess.text
the file that is htaccess-nginx.text I didn't touch
but the file that is htaccess.text, I added
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
directly under this text that was already in the file:
<IfModule mod_rewrite.c>
RewriteEngine On
..................................................
now the htaccess-nginx.text looks like
# Note: You are able to choose a different name in the Admin CP. If you've done that you need to change it here too
location ~ /error.log
{
deny all;
}
# Note: You are able to rename the admin directory. If you've done that, you need to change it here too
location /admin/backups {
deny all;
}
rewrite ^/forum-([0-9]+).html$ /forumdisplay.php?fid=$1 last;
rewrite ^/forum-([0-9]+)-page-([0-9]+).html$ /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-([0-9]+).html$ /showthread.php?tid=$1 last;
rewrite ^/thread-([0-9]+)-page-([0-9]+).html$ /showthread.php?tid=$1&page=$2 last;
rewrite ^/thread-([0-9]+)-lastpost.html$ /showthread.php?tid=$1&action=lastpost last;
rewrite ^/thread-([0-9]+)-nextnewest.html$ /showthread.php?tid=$1&action=nextnewest last;
rewrite ^/thread-([0-9]+)-nextoldest.html$ /showthread.php?tid=$1&action=nextoldest last;
rewrite ^/thread-([0-9]+)-newpost.html$ /showthread.php?tid=$1&action=newpost last;
rewrite ^/thread-([0-9]+)-post-([0-9]+).html$ /showthread.php?tid=$1&pid=$2 last;
rewrite ^/post-([0-9]+).html$ /showthread.php?pid=$1 last;
rewrite ^/announcement-([0-9]+).html$ /announcements.php?aid=$1 last;
rewrite ^/user-([0-9]+).html$ /member.php?action=profile&uid=$1 last;
rewrite ^/calendar-([0-9]+).html$ /calendar.php?calendar=$1 last;
rewrite ^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+).html$ /calendar.php?calendar=$1&year=$2&month=$3 last;
rewrite ^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+).html$ /calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 last;
rewrite ^/calendar-([0-9]+)-week-(n?[0-9]+).html$ /calendar.php?action=weekview&calendar=$1&week=$2 last;
rewrite ^/event-([0-9]+).html$ /calendar.php?action=event&eid=$1 last;
Any idea what I can do to force example.com to become SSL?
The weird thing is, when I click the logo, the page becomes SSL: https://example/index.php
and all pages are ssl afterwards.
Hey man, what's up?