Solved

PHP redirect to SSL

Posted on 2009-05-15
3
370 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

Will my email signature work in Office 365?

You've built an email signature using raw HTML code in Office 365, but you can't review how it looks with Transport Rules. So you have to test it over and over again before it can be used. Isn't this a bit of a waste of your time? Wouldn't a WYSIWYG editor make it a lot easier?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…

932 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

14 Experts available now in Live!

Get 1:1 Help Now