# SOLVED - Modify .htaccess file for https

**URL:** <https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652>\
**Category:** RapidWeaver Classic\
**Created:** [December 21, 2016, 7:03pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652 "2016-12-21T19:03:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![LSPhoto](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/lsphoto/32/270_2.png) [@LSPhoto](https://forums.realmacsoftware.com/u/LSPhoto)\
**Post date:** [December 21, 2016, 7:03pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/1 "2016-12-21T19:03:26Z")

</div>

Can anyone help me figure out how to find and change my .htaccess file to make my website always go to the https version? I don’t even know where to find it.

update. I found the file and pasted code: (replaced your domain with mine).  
RewriteEngine On  
RewriteCond %{SERVER\_PORT} 80  
RewriteRule ^(.\*)$ [https://yourdomain.com/$1](https://yourdomain.com/%241) [R=301,L]

Can anyone see if this is working for me?

> **[Lisa Sandler Photography and Design](https://www.lisasandlerphotography.com/)**
>
> Best Los Angeles family and child photographer, Corporate Headshots and event photography.

thanks 🙂

---

<div class="post-metadata">

**Author:** ![thang](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/thang/32/303_2.png) [@thang](https://forums.realmacsoftware.com/u/thang)\
**Post date:** [December 21, 2016, 7:23pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/2 "2016-12-21T19:23:50Z")

</div>

It works for me. 🙂

---

<div class="post-metadata">

**Author:** ![LSPhoto](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/lsphoto/32/270_2.png) [@LSPhoto](https://forums.realmacsoftware.com/u/LSPhoto)\
**Post date:** [December 21, 2016, 7:24pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/3 "2016-12-21T19:24:59Z")

</div>

awesome, thanks. Not being a programmer, these things can be confusing for me.

---

<div class="post-metadata">

**Author:** ![teefers](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/teefers/32/8173_2.png) [@teefers](https://forums.realmacsoftware.com/u/teefers)\
**Post date:** [December 21, 2016, 9:17pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/4 "2016-12-21T21:17:24Z")

</div>

Yes it worked for me as well.  
I would recommend for other people to always use a 302 (r=302) until after you have tested completely then change to a r=301.  
HTTP RC 301’s are **permanent**. As such they are cached by browsers and proxy servers with no set expiration date.

[http://htaccess.madewithlove.be](http://htaccess.madewithlove.be)

Above is a site to unit test .htaccess file redirects.

---

<div class="post-metadata">

**Author:** ![LSPhoto](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/lsphoto/32/270_2.png) [@LSPhoto](https://forums.realmacsoftware.com/u/LSPhoto)\
**Post date:** [December 21, 2016, 9:47pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/5 "2016-12-21T21:47:21Z")

</div>

Thanks for the link… So I got this:

 ![](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/2X/a/a40a9d694dbadeb31f5b409e1b09ca5eb2379ea6.png)

Does that mean I’m ok?

---

<div class="post-metadata">

**Author:** ![teefers](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/teefers/32/8173_2.png) [@teefers](https://forums.realmacsoftware.com/u/teefers)\
**Post date:** [December 21, 2016, 10:37pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/6 "2016-12-21T22:37:45Z")

</div>

Yes your great.  
The test stopped means that it met your condition and redirected. If you had other rules ( Apache directives) below this redirect it is telling you it stopped processing and did the redirect.

---

<div class="post-metadata">

**Author:** ![robbeattie](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/robbeattie/32/78_2.png) [@robbeattie](https://forums.realmacsoftware.com/u/robbeattie)\
**Post date:** [August 17, 2017, 3:18pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/7 "2017-08-17T15:18:19Z")

</div>

I’ve been trying to do exactly the same as @LSPhoto with the same host (Chillidog) and am having no joy at all.

Here’s what my .htaccess file has in it.

RewriteEngine On  
RewriteCond %{SERVER\_PORT} 80  
RewriteRule ^(.\*)$ [https://www.emilybolam.com/$1](https://www.emilybolam.com/%241) [R,L]

but going to [emilybolam.com](http://emilybolam.com) or [www.emilybolam.com](http://www.emilybolam.com) doesn’t re-direct to the https:// version.

Any clues as to where I’ve wandered off course gratefully received.

TIA

Rob

---

<div class="post-metadata">

**Author:** ![LSPhoto](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/lsphoto/32/270_2.png) [@LSPhoto](https://forums.realmacsoftware.com/u/LSPhoto)\
**Post date:** [August 17, 2017, 3:24pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/8 "2017-08-17T15:24:00Z")

</div>

I honestly don’t even remember how I did this… but your code does look a little different than mine… not sure if the 301 will fix it?

RewriteRule ^(.\*)$ [https://yourdomain.com/$1](https://yourdomain.com/%241) [R=301,L]

---

<div class="post-metadata">

**Author:** ![robbeattie](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/robbeattie/32/78_2.png) [@robbeattie](https://forums.realmacsoftware.com/u/robbeattie)\
**Post date:** [August 17, 2017, 3:44pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/9 "2017-08-17T15:44:12Z")

</div>

Curiouser and curiouser. It doesn’t make any difference in Safari or Chrome but using a just downloaded version of Firefox, it _does_ work.

Could you do me a favour @LSPhoto and just put [www.emilybolam.com](http://www.emilybolam.com) into your browser and see if returns the https version?

Thanks

---

<div class="post-metadata">

**Author:** ![LSPhoto](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/lsphoto/32/270_2.png) [@LSPhoto](https://forums.realmacsoftware.com/u/LSPhoto)\
**Post date:** [August 17, 2017, 3:48pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/10 "2017-08-17T15:48:41Z")

</div>

I tried all 3 browsers and not seeing the lock indicating ssl.

---

<div class="post-metadata">

**Author:** ![robbeattie](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/robbeattie/32/78_2.png) [@robbeattie](https://forums.realmacsoftware.com/u/robbeattie)\
**Post date:** [August 17, 2017, 3:50pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/11 "2017-08-17T15:50:17Z")

</div>

Ah well, back to the drawing board. Thanks for trying.

---

<div class="post-metadata">

**Author:** ![jabostick](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jabostick/32/1760_2.png) [@jabostick](https://forums.realmacsoftware.com/u/jabostick)\
**Post date:** [August 17, 2017, 4:04pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/12 "2017-08-17T16:04:16Z")

</div>

Do you have anything else in your htaccess file? I remember instructions for this stating that it should be above other rules with similar prefixes

---

<div class="post-metadata">

**Author:** ![robbeattie](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/robbeattie/32/78_2.png) [@robbeattie](https://forums.realmacsoftware.com/u/robbeattie)\
**Post date:** [August 17, 2017, 4:08pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/13 "2017-08-17T16:08:39Z")

</div>

Nope, nothing else. Just exactly what I’ve listed.

---

<div class="post-metadata">

**Author:** ![LSPhoto](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/lsphoto/32/270_2.png) [@LSPhoto](https://forums.realmacsoftware.com/u/LSPhoto)\
**Post date:** [August 17, 2017, 4:11pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/14 "2017-08-17T16:11:49Z")

</div>

Mine has lots of code in it for all pages… but I think it was generated… I didn’t type it.

 ![55 AM](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/2X/0/06f73b3680c8558b217e762ac42444226f566de7.png)

---

<div class="post-metadata">

**Author:** ![jabostick](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jabostick/32/1760_2.png) [@jabostick](https://forums.realmacsoftware.com/u/jabostick)\
**Post date:** [August 17, 2017, 4:22pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/15 "2017-08-17T16:22:54Z")

</div>

I tried the debugger/testing tool linked above ([http://htaccess.madewithlove.be/](http://htaccess.madewithlove.be/)) and it all seemed to pass ok so, short of some caching thing with cloudflare or something (which wouldn’t impact htaccess files, I wouldn’t think), I’m unfortunately out of ideas/expertise. Maybe Greg will be able to get you sorted if you haven’t already started a ticket with him

---

<div class="post-metadata">

**Author:** ![robbeattie](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/robbeattie/32/78_2.png) [@robbeattie](https://forums.realmacsoftware.com/u/robbeattie)\
**Post date:** [August 17, 2017, 6:14pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/16 "2017-08-17T18:14:33Z")

</div>

I’ve started a ticket with @barchard but again he seems to think there’s nothing wrong with the .htaccess file. But Im no further forwards in understanding why it’s not working for me and for others.

I used the same tool to test it - as recommended in another forum thread - and got the same result.

Buggeration.

Rob

---

<div class="post-metadata">

**Author:** ![teefers](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/teefers/32/8173_2.png) [@teefers](https://forums.realmacsoftware.com/u/teefers)\
**Post date:** [August 17, 2017, 6:24pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/17 "2017-08-17T18:24:33Z")

</div>

It sounds like your htaccess file may not be working (read). There are internal apache directives; the file could be in the wrong place, etc. Try placing "junk in the file (anything that is not a good htaccess syntax), you should get a 500 error if it is being read.

> <https://stackoverflow.com/questions/9234289/how-to-debug-htaccess-rewriterule-not-working>

---

<div class="post-metadata">

**Author:** ![robbeattie](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/robbeattie/32/78_2.png) [@robbeattie](https://forums.realmacsoftware.com/u/robbeattie)\
**Post date:** [August 17, 2017, 6:29pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/18 "2017-08-17T18:29:01Z")

</div>

OK, so I changed it to this?

RewriteEngine On  
RewriteCond %{SERVER\_PORT} 80  
Hello toodle-oo  
RewriteRule ^(.\*)$ [https://www.emilybolam.com/$1](https://www.emilybolam.com/%241) [R=301,L]

But when I re-load the site, it appears as before. So does that mean the file isn’t being read?

It’s in my root directory which on CDog is public\_html

Rob

---

<div class="post-metadata">

**Author:** ![barchard](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/barchard/32/2292_2.png) [@barchard](https://forums.realmacsoftware.com/u/barchard)\
**Post date:** [August 17, 2017, 6:32pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/19 "2017-08-17T18:32:11Z")

</div>

Please don’t touch or modify things while I investigate your ticket. Thanks 🙂 too many cooks in the kitchen spoil the broth 🙂

---

<div class="post-metadata">

**Author:** ![robbeattie](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/robbeattie/32/78_2.png) [@robbeattie](https://forums.realmacsoftware.com/u/robbeattie)\
**Post date:** [August 17, 2017, 6:33pm UTC](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652/20 "2017-08-17T18:33:54Z")

</div>

Happy to sit back and let the master do his work. But what with this and a related Google SNAFU I’d really like to get it solved.

Thanks

Rob

[Next page](https://forums.realmacsoftware.com/t/solved-modify-htaccess-file-for-https/11652.md?page=2)
