This topic is locked

HTTPS/SSL how to?

11/12/2007 11:10:05 AM
PHPRunner General questions
F
Fawaz author

I do have SSL certificate on my web server, but I need to know how to configure PHPRunner project folder so that I can force all PHPRunner generated pages/files/folders to use my certificate.
Examples:

http://www.whatever.com/phprunner/login.php to https://www.whatever.com/phprunner/login.php

http://www.whatever.com/phprunner/client_list.php to https://www.whatever.com/phprunner/client_list.php
Any hint?
Thanks,

Fawaz

Admin 11/12/2007

Move all files to HTTPS folder (HTTPSDOCS or similar). This is it.

F
Fawaz author 11/12/2007

Move all files to HTTPS folder (HTTPSDOCS or similar). This is it.


I don't have such folder, all projects on this web server are in htdocs folder, some projects are secure via https and some are not.

I am responsible only about phprunner project folder, where I have to force the users to use https only.
Thanks,

Fawaz

Admin 11/13/2007

Fawaz,
you need to contact your server admin to do this.

F
Fawaz author 11/13/2007

Fawaz,

you need to contact your server admin to do this.


Here is the solution:

if($HTTP_SERVER_VARS["HTTPS"] != "on")
{
$newurl = "https://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
header("location: $newurl");
}


But its really hard work to apply the previous code for each PHP generated page from PHPRunner.

Is there a way to apply the previous code once?
Thanks
Fawaz

Admin 11/13/2007

Fawaz,
put it to the beginning of include\dbcommon.php file.