da HTTP a HTTPS con .htaccess
-
Buongiorno a tutti i webmaster
sono alle prese col mio primo sito in wordpress ed ho bisogno di inserire nel file .htaccess il codice per reindirizzare tutte le richieste da http a https, con e senza il www. Ho trovato il seguente codice che credo faccia al caso mioRewriteCond %{HTTPS} =off [OR]
RewriteCond %{HTTP_HOST} !^www\. [OR]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.(html|php)
RewriteCond %{HTTP_HOST} ^(www\.)?(.+)$
RewriteRule ^(index\.(html|php))|(.*)$ https://www.%2/$3 [R=301,L]ma dovete perdonarmi non so dove e come devo inserirlo nell’attuale file .htaccess generato da wordpress e che si presenta così:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
# 1 Protect wpconfig.php
<files wp-config.php>
order allow,deny
deny from all
</files>Poete aiutarmi?
- Il topic ‘da HTTP a HTTPS con .htaccess’ è chiuso a nuove risposte.