Solved

htaccess redirect fromt https to http

Posted on 2011-03-08
8
735 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Rate limit for DNS queries 7 87
open source backup solution 1 36
web server: redirect 123.domain.com to www.domain.com/123 16 38
Internal CA server 6 52
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 …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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 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…

820 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