Solved

htaccess redirect fromt https to http

Posted on 2011-03-08
8
731 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:Victor Kimura
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 13

Assisted Solution

by:dsmile
dsmile earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I'll have to try with a php redirect and see if that works later.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
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 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…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now