Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

locking down my admin folder


hondauser85

Recommended Posts

i did this and it still dont work

 

Quick Setup of Admin Authentication.

 

// Open /admin/includes/application_top.php add the following code in

// include authentication user/password of administration

$include_file = DIR_WS_INCLUDES . 'authen.php'; include(DIR_WS_INCLUDES . 'include_once.php');

 

 

// Open /admin/includes/configure.php and add the following code in

// define admin user/password

define('ADMIN_USERNAME', 'admin');

define('ADMIN_PASSWORD', 'mypasword');

 

 

// Save the following PHP codes as authen.php in /admin/includes/authen.php

<?php

 

if(!isset($PHP_AUTH_USER))

{ header('WWW-Authenticate: Basic realm="' . TITLE . '"');

header('HTTP/1.0 401 Unauthorized');

echo $SERVER_NAME . ' Authorization Required.';

exit;

}

else

{ if (($PHP_AUTH_USER != ADMIN_USERNAME) || ($PHP_AUTH_PW != ADMIN_PASSWORD))

{ header('WWW-Authenticate: Basic realm="' . TITLE. '"');

header('HTTP/1.0 401 Unauthorized');

echo $SERVER_NAME . ' Authorization Required.';

exit;

}

}

 

?>

 

if i renamed my admin folder to xyz would i have to change it everywhere it says admin above?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...