Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP redirect to SSL

Posted on 2009-05-15
3
Medium Priority
?
422 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 2000 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

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

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

How to effectively resolve the number one email related issue received by helpdesks.
Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

879 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