Solved

htaccess redirect fromt https to http

Posted on 2011-03-08
8
737 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
[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
  • 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
Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all 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 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ROBOTS.TXT vs HTACCESS for Sitemaps entry 2 30
http response code 3 39
Golang on CentOS / Fedora 2 15
PartedMagic Secure Erase 14 35
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

710 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