473,406 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Moved: Add HTTPS/SSL to a Site

Once I have a site that's already up and running, what changes do I have to make to secure it so that any HTTP requests are rejected, all pages (except the index) must be accessed via HTTPS. Obviously I have to change all of the hyperlinks to https://, but apart from that what do I need to do?

Note: I'm refering to a professionally hosted site which will already have any necissary SSL modules for Apache/PHP is necisarry installed and enabled, I just need to know what changes to make to the PHP so it says no to any unsecured requests other than the index. And do I need to get a digital cirtificate?
Oct 22 '08 #1
6 2198
nathj
938 Expert 512MB
This is often a lot less complicated than you might think.

I had a site hosted that needed to use SSL on all pages (a bit easier) and all I had to do was ask the host to provide the certificate and the code for my .htaccess file. This last bit is simply a command to inform the server that you are using the secure server.

With that in place it was all sorted.

There's nothing you need to do in PHP as far as I am aware. I think your next stop should be contact your host and ask them about it. If they're any good you should be sorted very quickly.

Also, as you say, any absolute paths will need to be updated.

Cheers
nathj
Oct 23 '08 #2
developing
110 100+
nothing.

ssl is a server issue. its got nothing to do with the runtime application. all you need to worry about are the links that point to your site as they will have to be changed from 'http' to 'https', which you already did
Oct 23 '08 #3
Okay thanks, I'll do that. :)
Oct 24 '08 #4
pbmods
5,821 Expert 4TB
Moved to the Apache forum.
Oct 25 '08 #5
I have a follow-up question: If I am using AJAX on an HTTPS page and make an asyncronous request using a relative URL such as "../test.php", will it resolve to an HTTPS request or a standard HTTP request? Do I have to change my AJAX in any way to make the asyncronous requests secure?
Nov 3 '08 #6
nathj
938 Expert 512MB
I think, that if the URL in the AJAX request is absolute then you may need to make the protocol HTTPS. However, if it is a relative path you should be okay.

That said there may be other factors involved, such as the server set up for the certificate. this is my LIMITED understanding.

Cheers
nathj
Nov 3 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Paul Sweeney | last post by:
Does anyone know of a working (python) https proxy which allows viewing of unencrypted data being sent from my browser to an https site? I've worked my way through most on the list at...
22
by: Bloke | last post by:
Hi all. Some time ago (years) I had a script on Python 2.2 that would retieve a HTTPS web site. I used python22-win32-ssl.zip to handle the SSL aspect and it worked wonderfully. I am...
5
by: John Xu | last post by:
I have a question regarding https and SSL between two web sites. I am not quit understand how asp application can handle https, encryption and SSL. Here is scenario: An asp application on my web...
3
by: zn | last post by:
This is a beginner question. I need to create a page that is encrypted by SSL. The web server is already serving SSL encrypted web pages with "https" before the link. Do I need to do anything other...
14
by: Peter Chant | last post by:
I'm currently authenticating a site I have built using basic http authentication built into apache. This has zero overhead on php which is a bonus but it seems to not quite work how I'd like. ...
2
by: Hai Nguyen | last post by:
Hi everyone !! I have a web application deloped on a web server. I have site A and site B both have link to this application. I want to check the URL from A and B. If it's correct with my...
0
by: DotNetJunkies User | last post by:
Hello everyone: Ok here is a very weird problem I am having and I hope that some of you can share some thoughts with me on this. First of all, let me start by listing what I have: 1.-...
3
by: E | last post by:
I have a https login page with C# code FormsAuthentication. After logging in, my https pages recognize that I'm logged in. My http pages do not. It's as if it's considering these pages under a...
8
by: vandenberc | last post by:
I am trying to setup an html page. I have a button and when you click on it I want it to go to either http:///.../demo.htm or https://..../demo.htm based on whether or not you went through the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.