S
S
Solovey852019-03-07 17:31:25
htaccess
Solovey85, 2019-03-07 17:31:25

301 redirect from http to https, how to make an exception?

Good afternoon!
Ordered and activated an SSL certificate on the server.
Specified a 301 redirect in the root directory in the .htaccess file.
RewriteEngine On
RewriteCond %{HTTP:PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI } [L,R=301]
All pages are now loaded via https
But! since the admin panel located at fcgl.ru/admin (not indexed by the Yandex robot) is set to http, now it does not work ...
My programmer will be able to do something not earlier than in a week. Can you please tell me how to set up a redirect exception for fcgl.ru/admin ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dodo512, 2019-03-07
@dodo512

RewriteEngine On

RewriteCond %{REQUEST_URI} !^/admin
RewriteCond %{HTTP:PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

S
Solovey85, 2019-03-07
@Solovey85

Unfortunately it didn't help...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question