FAQ  |  Search  |  Register  |  Profile  |  Log in to check your private messages  |  Log in

URL rewrite http->https

 
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting
View previous topic :: View next topic  
Author Message
lestat
-


Joined: 15 Sep 2003
Posts: 127

PostPosted: Fri Feb 24, 2012 6:42 pm    Post subject: URL rewrite http->https Reply with quote

Hi,
I just got an SSL certificate. A lot of my users have old urls saved with http.

Can I use a rewrite rule to convert old links from:
http://mysite.com/path/page.php to https://mysite.com/path/page.php

How/where do I do that?

Thanks.
_________________
XP Pro sp2
Abyss Web Server X2 (v 2.9.3.5)
PHP 5.3.8
Back to top
View user's profile Send private message MSN Messenger
admin
Site Admin


Joined: 03 Mar 2002
Posts: 729

PostPosted: Tue Mar 06, 2012 12:38 am    Post subject: Re: URL rewrite http->https Reply with quote

lestat,

Very easy to do. Change the host to be a dual HTTP+HTTPS host and go to its General Parameters then press Edit in front of its Advanced Parameters. Now add / to the "Exclusively Serve on HTTPS" table. This will force the server to redirect all HTTP URLs to their HTTPS counterpart automatically.
_________________
Forum Administrator
Aprelium - http://www.aprelium.com
Back to top
View user's profile Send private message
anybody
-


Joined: 17 Mar 2008
Posts: 90

PostPosted: Wed Mar 07, 2012 5:34 pm    Post subject: Reply with quote

Small problem with this whole idea.

Everything in the page source also needs to be called using a ssl (443/HTTPS) connection. Any images, css, javascripts, everything being displayed or it isn't an encrypted connection. This is a common issue in most content management systems today.

Go download and use Google Chrome. It'll show you strait up if everything being displayed is encrypted. If everything in the page is not encrypted, chrome turns the HTTPS in the address bar red and but a line through it. If everything in the page is encrypted then chrome will show a green HTTPS in the address bar.

Firefox does not tell you if everything being displayed is encrypted or not. All firefox does is shows you the HTTPS in the address bar.

I don't use internet explorer and haven't in many years so I have no idea if IE warns you or not.

I suggest you go download Abyss Web Server: Mod Rewrite Translator. It is the greatest tool ever for translating htaccess to Abyss' URL Rewriting.

Clicking this thumbnail image will shows you how to setup abyss to redirect to an encrypted connection. Doing this will shorten the load time of your pages from what was explained in the post above mine.
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 729

PostPosted: Tue Mar 13, 2012 11:39 pm    Post subject: Reply with quote

anybody wrote:
Small problem with this whole idea.


If you use virtual paths only to refer to images and embedded objects you won't have any problem.

Instead of <img src="http://mysite.com/images/car.png">, it is preferred to use <img src="/images/car.png">.

This will make you site work on any domain name and with HTTP or HTTPS.
_________________
Forum Administrator
Aprelium - http://www.aprelium.com
Back to top
View user's profile Send private message
anybody
-


Joined: 17 Mar 2008
Posts: 90

PostPosted: Fri Mar 23, 2012 5:00 am    Post subject: Reply with quote

Yeah, I'm aware of that. I had to modify some of the code in CMS Made Simple to fix this problem. Regardless of all that, I thought I'd open my mouth so everyone knows. And thank you for commenting 'cause now they know even more then what I had to say.

scientia est potentia
knowledge is power
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group