close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Rollover to secure site

Thread began 7/27/2010 11:27 am by don74768 | Last modified 7/30/2010 2:26 pm by Eric Mittman | 750 views | 6 replies |

don74768

Rollover to secure site

Network Solutions is the host for all of my sites, and I'm bringing the first e-commerce site online this week. I've gotten the SSL certification to use for my domain already taken care of. My question is how to get the index page to initially load in the secured environment.

Can I simply use Dreamweaver (CS5) and change the name of the PowerStore index page and make a rollover index page?

The transactions are being handled through Authorize.net, if that influences your answer in any way.

Sign in to reply to this post

Eric Mittman

You can use this handy snippet of php code that I have come up with that will automatically redirect the user to the secure version of any page on the site if they visit the non secured version of the page.

php:
<?php if((!(isset($_SERVER['HTTPS']))) || ($_SERVER['HTTPS'] == "") || ($_SERVER['HTTPS'] == "off"))header("Location: https://" $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']); ?>



You would just add it to the top of any pages that you would like to only come up through https. Once the user is on the secure version of the site any relative links they click on will take them to the secure version of that page as well.

Sign in to reply to this post

don74768

Thanks!

Great! I appreciate it so much!

Sign in to reply to this post

don74768

Whoops...

It isn't resolving, but instead seems to be creating a never-ending loop. I sure wish I understood php better.

Sign in to reply to this post

Eric Mittman

This code is checking the php server variable for https, this is a variable that should have a value if you are on https. The code checks to see if it is not set, if it is set but has no value, or if it is set to 'off'. If any of these three conditions are met then the page is not being served up through https. The action of this check is to send the user to this page via https.

You might be having a problem with the redirect value in the header. Rather than use the value in the code for this you should try setting the redirect like this:

php:
header("Location: https://yoursite.com/yourpage.php");



Hard coding in the page might help it. If you would like to know more about this php setting here is the manual page that includes info for it:

reserved.variables.server.php

If the values are not like this on your server, or the code just does not work for your instance you may need to come up with a different method of sending the user to the https version of the page.

Sign in to reply to this post

don74768

One more question...

Thank you for that reference.

As usual, your customer support is fantastic. This is why I have so many licenses for your products.

One last question on this... Using the Dreamweaver site manager panel would it be possible simply to rename the index page something like "storeindex.php" and create a simple html rollover, or would this screw up other coding? Since Dreamweaver updates the links throughout the managed site it would obviously take care of the basic links, but are there other issues it wouldn't address?

Sign in to reply to this post

Eric Mittman

There is definitely the potential to cause other parts to no longer work if the index page is used for anything other than the links, but as far as I know the main index page in your site should just be linked to and not have any real functionality on it itself.

You should make a backup of the files before you do this then test out the site by trying to login from the index page then try to go from the index page to other pages in the site. If everything seems ok then I think this would be a good alternative.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...