A
A
Andrey2015-10-17 15:25:43
WordPress
Andrey, 2015-10-17 15:25:43

How to set up redirect from https to http in .htaccess?

A certificate is connected to the site on CMS Wordpress. The certificate was connected for Yandex Checkout to work.
Not all pages on https work correctly, for this reason I want to set up a redirect to most of the pages through htaccess.
How to set up a redirect from all pages of the site from https to http and leave a few without a redirect, or vice versa set up redirects to specific pages?

Now the htaccess file looks like this:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kapuletti, 2015-10-17
@kapuletti

I'm not a mod_rewrite expert, but I have a redirect from http to https on my site and it looks like this. way:

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

Try http:// instead of https://, it might work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question