kn0wl3dg3 Posted August 8, 2011 Share Posted August 8, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/244226-help-with-https/ Share on other sites More sharing options...
JKG Posted August 8, 2011 Share Posted August 8, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/244226-help-with-https/#findComment-1254352 Share on other sites More sharing options...
kn0wl3dg3 Posted August 8, 2011 Author Share Posted August 8, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/244226-help-with-https/#findComment-1254376 Share on other sites More sharing options...
JKG Posted August 8, 2011 Share Posted August 8, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/244226-help-with-https/#findComment-1254381 Share on other sites More sharing options...
kn0wl3dg3 Posted August 8, 2011 Author Share Posted August 8, 2011 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 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 Quote Link to comment https://forums.phpfreaks.com/topic/244226-help-with-https/#findComment-1254422 Share on other sites More sharing options...
kn0wl3dg3 Posted August 8, 2011 Author Share Posted August 8, 2011 Update: I got my https working with a mod-rewrite in the .htaccess file. Now, the only problem is that it pops up that annoying warning about content being delivered securely every time I open a page.. Is there any way to get rid of that? Quote Link to comment https://forums.phpfreaks.com/topic/244226-help-with-https/#findComment-1254510 Share on other sites More sharing options...
kn0wl3dg3 Posted August 8, 2011 Author Share Posted August 8, 2011 Actually, it's only 5 files. (Of about 50). They're all in front of the login..weird Any ideas anyone? The rest work without the annoying alert. Quote Link to comment https://forums.phpfreaks.com/topic/244226-help-with-https/#findComment-1254516 Share on other sites More sharing options...
kn0wl3dg3 Posted August 8, 2011 Author Share Posted August 8, 2011 Update: Ok, got it. It was a jquery call that wasn't using https. Quote Link to comment https://forums.phpfreaks.com/topic/244226-help-with-https/#findComment-1254525 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.