Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding a secured page


arames

Recommended Posts

HI there,

 

I know how to add a NORMAL Box page (creating a new apge).

 

But I wanted the new page about_us.php to force the SSL, how do I add this?

 

I mean to show this page in the secure way?

 

Thanx in advance for your help,

Arames

Link to comment
Share on other sites

At the top of the page code, just AFTER this line:

 

  require('includes/application_top.php');

ADD this code:

 

  if ( $request_type != 'SSL' ) {
header('Location: ' . HTTPS_SERVER . DIR_WS_CATALOG . basename($PHP_SELF));
 }

This code should work on any osC page you wanted to do this to.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

You're welcome.

 

I changed the code after you looked at it I beleive, so look it over once more.

;)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

If you looked closely, the first code produced an extra / in the URL.

 

It did work.

 

That'll teach me to answer posts before I'm fully awake...

:blush:

 

:lol:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Germ,

 

what do I need to change in the configure.php so that my administration pages open in httpS and not http ?

 

I already have a secured pass in .htaccess but i also need the pages to open in https.

 

here is my configure.php

 

define('HTTP_SERVER', 'http://www.mydomain.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.mydomain.com');

define('HTTPS_CATALOG_SERVER', 'https://www.mydomain.com');

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/var/www/html/shop/'); // where the pages are located on the server

define('DIR_WS_ADMIN', '/shop/securedadmin/'); // absolute path required

define('DIR_FS_ADMIN', '/var/www/html/shop/securedadmin/'); // absolute pate required

 

Thanx a million ;)

Link to comment
Share on other sites

define('HTTP_SERVER', 'https://www.mydomain.com');

or,

 

define('HTTP_CATALOG_SERVER', 'https://www.mydomain.com');

or both.

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

what do I need to change in the configure.php so that my administration pages open in httpS and not http ?

The key word there being "open".

 

The only ways to make it "open" in SSL are with a mod rewrite in a .htaccess file, or access it with your SSL URL.

 

The other changes suggested in this thread will probably make it stay in SSL mode after the initial access and logon.

 

Personally, I've accessed mine with the proper SSL URL, then saved it in my "favorites", and always use that link in my browser's "favorites".

;)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

yep, it is 'OPEN', and not 'CLOSE' :) .

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...