A
A
Anton2015-10-09 12:23:21
Apache HTTP Server
Anton, 2015-10-09 12:23:21

Why doesn't RewriteRule for HTTPS work?

This rule in httpd.conf works for HTTP and doesn't work for HTTPS
RewriteRule ^/$ /site/hs/dash/ind [R]
I want to redirect request https://mysite.ru/ to https://mysite.ru/site /hs/dash/ind

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Sidorenko, 2015-10-11
@sidorenkoda

You have to check the port:

RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}:443/$1

If you need to redirect to a specific folder, then try this:
yourFolder - naturally a folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question