Solved

htaccess redirect fromt https to http

Posted on 2011-03-08
8
734 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 500 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 500 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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 500 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 500 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CentOS 7 Installation 7 73
Coding C# in Linux 8 67
Securing Azure Oracle instance of Linux VM 4 58
Review of OCA certificate policy 1 17
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

772 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