Solved

PHP redirect to SSL

Posted on 2009-05-15
3
358 Views
Last Modified: 2012-05-07
I haved used this script for the past year or so with a home made SSL which worked fine but I always got the warning page about my certificates validity etc. Anyway, I purchased a SSL from GO daddy today but now I get a web page stating..

<?php

header( 'Location: http://remote.claybar.com/exchange' ) ;

?>


All I really want is for the users to be able to type in www.claybar.com/mail and have it redirect to http://remote.claybar.com which has the SSL cert.

Also. When I go into the IIS server and click on option to Enable SSL and 128 bit encryption I am presented with a dialog box regarding inheritance overrides regarding "UNCPassword" property and "AccessSSLFlags"

I am unsure if I should tell IIS to assign my new option to all these child nodes or not.  

THANK YOU.. I tried to assign alot of points because I am aware this is a multipart question.  My PHP is running on Ipowerweb and is set to PHP version 5
<DIR><FONT size=2>

<P>&lt;?php</P>

<P>header( 'Location: h</FONT><U><FONT color=#0000ff size=2>ttp://remote.claybar.com/exchange'</U></FONT><FONT size=2> ) ;</P>

<P>?&gt;</P></DIR></FONT>

Open in new window

0
Comment
Question by:daviper
3 Comments
 
LVL 12

Expert Comment

by:Steven Wells
ID: 24394100
you could also just put an HTML redirect page in that virutal directory that would be easier as you could use html, rather than PHP. Unless  your web server is of course php.

http://www.instant-web-site-tools.com/html-redirect.html

0
 
LVL 4

Accepted Solution

by:
trencH87 earned 500 total points
ID: 24413686
mod_rewrite is more suited for this.

1. Place a file called .htaccess (including the dot in front.) in your root folder for www.claybar.com/mail.
2. Open any editor and insert the following lines

RewriteEngine on
RewriteCond %{HTTPS} off
 RewriteRule (.*) http://remote.claybar.com/

3. Save it and you are good to go.



0
 

Author Closing Comment

by:daviper
ID: 31581817
This was perfect, and I learned alot about .htaccess after the fact too. Thank you and I am sorry for the long time to accept, I had given up on an answer.
0

Featured Post

Why do Marketing keep bothering you?

Is your marketing department constantly asking for new email signature updates? Are they requesting a different design for every department? Do they need yet another banner added? Don’t let it get you down! There is an easy way to manage all of these requests...

Join & Write a Comment

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now