N
N
Nikita2016-02-11 14:50:58
htaccess
Nikita, 2016-02-11 14:50:58

.htaccess redirect to https from an address like site.ru?

If you enter the site by entering the address of the type - site.ru and www.site.ru, the site fonts are not loaded. Made a redirect in htaccess (to redirect to - https://site.ru)

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /

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

It redirects only when you enter the address - www.site.ru, but how to redirect from the address - site.ru.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2016-02-26
@shambler81

RewriteCond %{HTTPS} on
RewriteRule ^.*$ http://%{SERVER_NAME}%{REQUEST_URI}

Will this topic work?
well, vice versa.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question