Solved

PHP redirect to SSL

Posted on 2009-05-15
3
402 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
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 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…
The viewer will learn how to dynamically set the form action using jQuery.

751 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