P
P
Prst2002020-09-14 18:33:04
htaccess
Prst200, 2020-09-14 18:33:04

How to remove file from .htaccess redirect?

Hello, there is a redirect in htaccess

RewriteCond %{HTTP:X-HTTPS} !=1
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

How to make sure that, for example, in the mysite/folder/folder/file.php file there is no redirect to https?
This seems to be possible to register in RewriteCond, but I don’t know how, tell me, please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2020-09-14
@shambler81

RewriteCond %{HTTP:X-HTTPS} !=1
RewriteCond %{REQUEST_URI} !^/folder/folder/file.php
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Sign of denial

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question