I am redesigning a website that is currently served over HTTPS via WPEngine. The new site will just be a static HTML landing page, which will be hosted on a totally new server over HTTP.
My concern is that users will get connection errors. Can I just use .htaccess to redirect HTTPS to HTTP to solve the issue?
May be this could help you, in htaccess
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
This will redirect https://www.test.com to http://www.test.com
For more http://www.hashbangcode.com/blog/using-htaccess-redirect-https-http
Related
As i have now https version of my website is it seo friendly to have "permanently moved" status 301, 200 and redirect the http url to https ?
I am using .htaccess to do this
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Here is the example of the non http url test:
Go to https://httpstatus.io/ and test url http://sunnybeachtaxi.com/from-Sunny-Beach-to-Burgas-airport-options-Burgas-1-4-35/book/
returns 301, 200
Now another question is what canonical url should i use http or https ? I know google prefers https but still not sure. At the moment http urls are indexed and https are not becouse they appear to google as dublicates.
What is the best steps to achive this ? Should i first remove the http urls and then submit to google index the https ones?
Thanks
If you want to permanent redirect from HTTP to HTTPS then you should first of all purchase SSL certificate and activate it for your site. Nowadays google does not allow some site which is running without HTTPS. Just add SSL to your site and you do not need to submit it again into google webmaster just because of that if you have update time to time sitemap of your website. crawler automatically understand.
What is canonical URL's?
A canonical tag is a different way of telling search engines that a specific URL represents the master copy of a page. visit this SEO MOZ page for more information. https://moz.com/learn/seo/canonicalization
Thank you in advance
I have my domain on Godaddy and hosting on Amazon with a SSl certificate from GoDaddy installed in the Amazon server. Hence whenever i type my domain name, its takes me in with the https prefix. Now I want to disable the SSL/https for my website. I tried the same using the below code;
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
But after adding the .htaccess file, mt website stopped loading up. Can you help me on this
I have recently moved from HTTP to HTTPS and there are some specific pages that need to be redirected. The http pages redirect but the https pages do not. I have created a test environment and a simplified htaccess with just two simple rewrites – one specifically for HTTP and one specifically for HTTPS. The htaccess file is in the test folder.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^test1.html$ https://www.example.com/test/test1new.html? [L,R=301]
RewriteCond %{HTTPS} on
RewriteRule ^test1.html$ https://www.example.com/test/test1new.html? [L,R=301]
Here's what happens:
http://www.example.com/test/test1.html => redirected to: https://www.example.com/test/test1new.html
The https test1 page is not redirected.
So HTTP works and HTTPS does not. For some reason, https pages cannot be redirected. I have performed the same tests on two other hosts and I always get the same thing. Is there a reason https redirects are being ignored? What can be done to make this work?
Thank you very much.
I have this Drupal project which inherited several domains, so I have:
www.domain1.com
www.domain1.co.uk
www.domain2.com
www.domain3.com
and I want to redirect all these domain to www.newdomain.com and also want to redirect all requests to https to http as well as redirect all the domains above without www to www.newdomain.com and have tried a few things but it didn't work.
Here's what I've tried:
RewriteCond %{HTTP_HOST} !^www\.newdomain\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/?(.*) http://www.newdomain.com/$1 [L,R,NE]
But with the above, all old domains (domain1.com, domain2.com, etc) gets redirected to www.newdomain.com, however when I hit https://domain1.com for example (it happens with all domains above using http), it shows a blank page. When I hit https://www.domain1.com it shows a warning from using a self signed certificate - meaning it doesn't redirect to http.
I've read on a page somewhere that I should delete these lines from htaccess:
RewriteRule ^ - [E=protossl]
RewriteCond %{HTTPS} on
RewriteRule ^ - [E=protossl:s]
But when I did, even the basic redirect that happens now (for instance, from www.domain1.com to www.newdomain.com stops working.
What am I missing here?
Thanks in advance
If https protocol always shows blank page, maybe there is distinct folder for it on your FTP ("httpsdocs" or something like that).
Also you should check your hosting provider's help page for more information about the https protocol and SSL certificate configurations.
I want to redirect my wordpress login page to use HTTPS but do not want the rest of the site using it. I know how to redirect all the site via HTTP to HTTPS but not just a specific URL.
So I want http://example.com/wp-admin to go to https://example.com/wp-admin
This is what I currently have below and I have tried adding bits in but not got there.
Redirect / https://example.com/
You need to use mod_rewrite to enable https for a specific url.
Try the following in htaccess :
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^wp-admin/?$ https://%{HTTP_HOST}%{REQUEST_URI} [NC,L,R]