Jump to content

Help with https


kn0wl3dg3

Recommended Posts

Our admin just added ssl to our site, and now I need to make it work.

 

Problem is, I've never used it before. I've tried to do some reading but there's a lot of conflicting info out there.

 

I know I can just add https to all my links, but I have them as relative links and that would require alot of time and rewriting code to use absolute urls.

 

I also read something about doing it in the .htaccess file, but I've never edited that either so I'm out of my comfort zone here. I do think this would be the best way though, since it would not require rewriting anything, and would be the most expandable.

 

I don't need all my pages to be secure, just anything past our login. Does anyone have any advice, ideas, or resources to help me out??

 

Thanks for reading

Link to comment
Share on other sites

yeah, just get your old login urls, and redirect them to the new https ones.

once they are through to the https area, the relative urls should keep them in there.

 

http://www.htaccessredirect.net/

 

or just google it, its nice and simple.

 

Google just pops up a hundred versions of the same script; just managed to confuse me. Thanks for the link, I'll check it out.

Link to comment
Share on other sites

make your .htaccess file in your root dir

 

copy this into it

 

redirect 301 http://www.site.com/old.htm https://www.site.com/new.htm

redirect 301 http://site.com/old.htm https://www.site.com/new.htm

 

then repeat those lines for each page.

maybe you only need to do your login page, maybe you will have to quite a few pages. depends on your login setup

Link to comment
Share on other sites

 

How does that differ from this code I found online?

 RewriteEngine On  
RewriteCond %{HTTPS} !on  
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

 

Is one better than the other?

 

maybe you only need to do your login page, maybe you will have to quite a few pages. depends on your login setup

 

I just have a login page that sets a session variable, then checks for it on the pages I want restricted.

 

Thanks for your help

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.