2019-05-30, 08:49 AM
Hello MyBB lovers!
I'm using the latest version of the MyBB and have a SSL certificate installed from my hosting company.
Suddenly, i came across an idea when i was browsing my forum's threads. I put http: instead of https: in the browser and it will not redirect me automatically to the https site.
Let me add that if i change from https to http on the index page , it will automatically redirect me to the https ,so,it is working fine there.
This is my .htaccess file:
Should i add something else to the .htaccess?
Thankyou in advance.
I'm using the latest version of the MyBB and have a SSL certificate installed from my hosting company.
Suddenly, i came across an idea when i was browsing my forum's threads. I put http: instead of https: in the browser and it will not redirect me automatically to the https site.
Let me add that if i change from https to http on the index page , it will automatically redirect me to the https ,so,it is working fine there.
This is my .htaccess file:
RewriteEngine on
# Some hosts require RewriteBase to make RewriteRules work.
RewriteBase /
# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteRule ^([^&]*)&(.*)$ https://myforum.com/$1?$2 [L,QSA,R=301]
# Google SEO 404:
ErrorDocument 404 /
# Google SEO Sitemap:
RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]
# Google SEO URL Forums:
RewriteRule ^Forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]
# Google SEO URL Threads:
RewriteRule ^Thread\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]
# Google SEO URL Announcements:
RewriteRule ^Announcement\-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]
# Google SEO URL Users:
RewriteRule ^User\-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]
# Google SEO URL Calendars:
RewriteRule ^Calendar\-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]
# Google SEO URL Events:
RewriteRule ^Event\-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.myforum.com [NC]
RewriteRule ^(.*)$ https://myforum.com/$1 [L,R=301,NC]
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Should i add something else to the .htaccess?
Thankyou in advance.