Report this

What is the reason for this report?

redirect http & https//www to https:(non-www)

Posted on December 14, 2016

I’m looking for a way to redirect my website in the following order:

all http --> https all www --> non-www

i was using following code in .htaccess

RewriteEngine on

RewriteCond %{HTTP_HOST} ^www.(.)$ [NC] RewriteRule ^(.)$ https://%1/$1 [R=301,L]

RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

but after using this code my other websites which was not using ssl started redirecting to https: as i am on shared server.

can some one provide me code for .htaccess which can redirect only 1 website and not interfere with other non ssl websites ?

thanks in advance.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.