Difference between revisions of "Apache: .htaccess"

From mmmv_kos
Jump to: navigation, search
(Created page with " Apache = HTTP pealt HTTPS peale suunamine = [https://www.aleydasolis.com/htaccess-redirects-generator/ Viide originaalleheküljele]. <syntaxhighlight lang="apache"> <...")
(No difference)

Revision as of 14:41, 20 May 2020

Apache


HTTP pealt HTTPS peale suunamine

Viide originaalleheküljele.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>


HTTPS pealt HTTP peale suunamine

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>