Hi, I'm currently going to change over from http to https for the forum itself. I assume once the IP configures within 24 to 48 hours, I just change the URLs in my admincp to "https" instead of "http"? I also have a find/replace script to run on the domain.com/findreplace.php which finds all traces of "http" and changes it to "https" for me. The question is, I don't use the "www" at all in on my site. Now, for the mod-rewrite in htaccess .. how would I force all users to use the "https" properly? As I'm sure most of my links in google and other search engines already list it all with the "http". Hence a redirect, but...to make sure all my users are redirected properly.. what should I do. I also have the no hotlink protection on my domain as well. Here below is my current .htaccess. How would I revamp it, to make sure everything is carried over from "http" to "https"? Notice the first rule, is to redirect www to domain.com itself. So how would I adjust the first "rule"? Anything normal "http" to "https" even if including the "www" to go to "https://mydomain.com"? I just want to make sure all of this correct though. I guess in the last rule at bottom of page, just change the "http"s to "https"? And find/replace all "http" in database and change them to "https"?
I just want to make sure people are redirected from like:
http://www.mydomain.com to https://mydomain.com
and
http://mydomain.com to https://mydomain.com
Code:
RewriteEngine on RewriteCond %{HTTP_HOST} ^www.mydomain.com$ [NC] RewriteRule ^(.*)$ http://mydomain.com/$1 [R=301,L] # This file is only needed if you have set the Forum Component URL in your admincp and you are # using the mod_rewrite option for friendly urls. If this is the case, copy this file # to your forum component stub directory. # If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your forum component directory. # RewriteBase /forum-stub-directory/ # If you are having problems with the rewrite from content/ to content.php, uncomment this line to turn MultiViews off. # Options -MultiViews RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] # Forum RewriteRule ^threads/.* showthread.php [QSA] RewriteRule ^forums/.* forumdisplay.php [QSA] RewriteRule ^members/.* member.php [QSA] RewriteEngine On RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L] ### THIS IS A LITTLE EXTRA SECURITY AND CAN BE REMOVED RewriteRule ^includes/(.*) index.php RewriteRule ^vb/(.*) index.php RewriteRule ^packages/(.*) index.php order deny,allow deny from 80.237.206.93 deny from rst.void.ru deny from 154.35.47.59 deny from 201.1.102.82 deny from 202.182.168.102 deny from 81.192.36.175 deny from 208.110.21.130 deny from 81.214.167.229 deny from geo.ya.com deny from dot.hazard.free.fr deny from www.sky-hq.net deny from sky-hq.net deny from barikat.org deny from 81.35.151.90 deny from xargonu.evonet.ro deny from 85.214.59.14 deny from Hackeriz.com deny from hackhaber.com deny from 85.103.235.210 deny from 212.175.219.40 deny from 85.103.109.37 deny from 62.68.196.25 deny from 209.25.148.220 deny from iahc.net deny from 72.36.139.90 deny from 5dma4arb.com deny from 66.45.237.220 deny from xorow.t35.com deny from av3.net deny from dion.ne.jp deny from fsurf.com deny from geo.yah.com deny from proxify.net deny from www.fetchfido.co.uk deny from fetchfido.co.uk deny from fetchfido.com deny from xargonu.vo deny from zed1.com deny from 59.138.70.148 deny from 64.110.104.133 deny from 154.35.47.59 deny from 62.135.105.216 deny from 81.24.26.152 deny from 196.217.249.162 deny from www.stardefacer.org deny from 85.141.153.155 deny from 85.140.0.0/15 deny from 196.217.0.0/16 deny from 80.187.107.183 allow from all <Files 403.shtml> order allow,deny allow from all </Files> deny from 94.75.121.141 deny from 87.242.25.247 RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://mydomain.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com$ [NC] RewriteRule .*\.(jpg|jpeg|gif|png|bmp|swf)$ http://mydomain.com/ [R,NC]
http://www.mydomain.com to https://mydomain.com
and
http://mydomain.com to https://mydomain.com
Comment