Jamit Software Forum
Welcome, Guest. Please login or register.
January 27, 2020, 01:07:57 am

Login with username, password and session length
Search:     Advanced search
May 5th, 2010 - Jamit Software Launches the Market!
3,080 Posts in 791 Topics by 1,604,551 Members
Latest Member: SibylMcAul
* Home Help Search Login Register
+  Jamit Software Forum
|-+  Jamit Job Board Customers
| |-+  User-to-User Support
| | |-+  HTTPS for Admin folder
« previous next »
Pages: [1] Print
Author Topic: HTTPS for Admin folder  (Read 1626 times)
Peter
Administrator
Hero Member
*****
Posts: 248



« on: June 17, 2010, 02:46:56 am »

Here is a good way to enforce HTTPS on your Admin folder, so that passwords (and any other information passed between you and the server) is encrypted.

Open the file /admin/index.php and add this code to the VERY TOP (before anything else):

Code:
<?php

if (!isset($_SERVER["HTTPS"]) || (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] != "on")) {
// reload page with HTTPS
header("Location: https://".$_SERVER["SERVER_NAME"]. $_SERVER["REQUEST_URI"]);
ob_flush();
exit;
}

?>

Of course, this will work only if you have an SSL certificate. BTW, I am using a hosting account with the PLESK control panel and it is very easy to create self-signed SSL certificate (for free).

If you use the above modification, there is no need to modifiy your .htaccess file. I have verified this to work on my Apache server, and there is a good chance that it may work on other servers as well.
« Last Edit: October 07, 2011, 04:02:17 am by Peter » Logged

SECURE your site BEFORE you wish you had! Use plugins by COLOSSAL MIND!
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.042 seconds with 17 queries.