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"> <...")
 
m
 
Line 5: Line 5:
 
= HTTP pealt HTTPS peale suunamine =
 
= HTTP pealt HTTPS peale suunamine =
  
[https://www.aleydasolis.com/htaccess-redirects-generator/ Viide originaalleheküljele].
+
[https://www.aleydasolis.com/htaccess-redirects-generator/ Viide Aleyda Solis nimelise vabakutselise originaalleheküljele].
  
 
<syntaxhighlight lang="apache">
 
<syntaxhighlight lang="apache">

Latest revision as of 14:50, 20 May 2020

Apache


HTTP pealt HTTPS peale suunamine

Viide Aleyda Solis nimelise vabakutselise 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>