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

x
?
Solved

htaccess redirect fromt https to http

Posted on 2011-03-08
8
Medium Priority
?
769 Views
Last Modified: 2012-08-13
Hi,

I want to create a 301 redirect with htaccess from https://www.mhmultilingualservices.com to http://mhmultilingualservices.com or I may wish to redirect it to https://secure.mhmultilingualservices.com.

How can I do this in .htaccess?

Thanks,
Victor
0
Comment
Question by:Victor Kimura
  • 4
  • 4
8 Comments
 
LVL 13

Accepted Solution

by:
dsmile earned 2000 total points
ID: 35079488
Try this

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} www.mhmultilingualservices.com
RewriteRule ^(.*)$ http://mhmultilingualservices.com/$1 [L,R=301]

or

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} www.mhmultilingualservices.com
RewriteRule ^(.*)$ https://secure.mhmultilingualservices.com/$1 [L,R=301]
0
 

Author Comment

by:Victor Kimura
ID: 35109980
Hi dsmile,

I just had a chance to test the https redirect. Unfortunately, it's not working.

https://www.mhmultilingualservices.com

I tried the following:
RewriteEngine on
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} www.mhmultilingualservices.com
RewriteRule ^(.*)$ http://mhmultilingualservices.com/$1 [L,R=301]

RewriteEngine on
RewriteCond %{HTTPS} www.mhmultilingualservices.com
RewriteRule ^(.*)$ http://mhmultilingualservices.com/$1 [L,R=301]

Any other suggestions?
0
 
LVL 13

Assisted Solution

by:dsmile
dsmile earned 2000 total points
ID: 35110796
Just test your domain.

I enter https://www.mhmultilingualservices.com/
and end up at http://mhmultilingualservices.com/

Don't know what you're using, but it works :)

BTW

This code you posted is a wrong one

RewriteEngine on
RewriteCond %{HTTPS} www.mhmultilingualservices.com
RewriteRule ^(.*)$ http://mhmultilingualservices.com/$1 [L,R=301]
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 

Author Comment

by:Victor Kimura
ID: 35115799
This what I get when I go to the https page:

http://tutorialref.com/images/https-redirect-htaccess.png

I'm using firefox 3.6, ie 8, and the latest Chrome. I don't think that should matter since it's at the server level with the htaccess script.


0
 
LVL 13

Assisted Solution

by:dsmile
dsmile earned 2000 total points
ID: 35125660
Just click "I Understand...", add your domain to trusted site, then you'll see the htaccess works (you'll be redirected to http://mhmultilingualservices.com/)
0
 

Author Comment

by:Victor Kimura
ID: 35126676
That's what I'm trying to avoid. The client is stating that her clients are complaining about that security issue pop-up notification. Is there a workaround to this?
0
 
LVL 13

Assisted Solution

by:dsmile
dsmile earned 2000 total points
ID: 35134947
There's no work-around, I'm afraid.
The cause of this is not htaccess, but SSL itself.
The only way to get rid of this popup notification for good (if not using my earlier suggestion) is to buy an SSL certificate, not using a self-signed one.
Check it here http://www.verisign.com/ssl/
0
 

Author Closing Comment

by:Victor Kimura
ID: 35145148
I'll have to try with a php redirect and see if that works later.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

885 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