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

SSL Redirect

Thread began 11/28/2011 8:54 pm by Gerald's Electric, LLC | Last modified 11/29/2011 11:00 am by Gerald's Electric, LLC | 453 views | 1 replies

Gerald's Electric, LLC

SSL Redirect

I am currently working on a new website and installed PS4.5. I enabled SSL Shared certificate with my host. I am trying to redirect all traffic to https:// , but PS4 will not redirect without errors. I am not aware of any .htaccess folders in my root directory. I was trying to include the following php code at the top of my index.php page to redirect traffic to https://
<?php
// If page requires SSL, and we're not in SSL mode,
// redirect to the SSL version of the page
if($_SERVER['SERVER_PORT'] != '443') {
header('Location: www.yourssladdress.com');
exit();
}
?>

What am i doing wrong? I want visitors to go straight to a https:// site.


************ Solution - Thanks Jason *******************

After reading about the blank space problem I looked at the code again. The code was correct, but I had a space between the above "<?Php" script and another. Wierd, but I removed the space and the webpage works great! - Thanks again.

**************************************************

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...