Solved

PHP redirect to SSL

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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

A couple of months ago we ran into an issue that necessitated re-creating our Edge Subscriptions. However, when we attempted to execute the command: New-EdgeSubscription -filename C:\NewEdgeSub_01.xml we received an error indicating that the LDAP se…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

635 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