This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Non permettere il caricamento di specifici tipi di file | |
| RewriteEngine on | |
| RewriteRule .*\.(jpg|jpeg|gif|png|bmp|exe|swf)$ - [F,NC] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Bloccare il traffico proveniente da certi siti | |
| RewriteEngine on | |
| Options +FollowSymlinks | |
| RewriteCond %{HTTP_REFERER} badsite\.com [NC,OR] | |
| RewriteCond %{HTTP_REFERER} badforum\.com [NC,OR] | |
| RewriteCond %{HTTP_REFERER} badsearchengine\.com [NC] | |
| RewriteRule .* - [F] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Usare sempre HTTPS per le connessioni sicure | |
| #Sostituisci 'www.example.com' con il tuo dominio così come appare sul certificato HTTPS | |
| RewriteEngine On | |
| RewriteCond %{SERVER_PORT} 80 | |
| RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Rinomina una cartella e forza l'utente al nuovo nome | |
| #Sostituisci 'old' con il nome della vecchia cartella | |
| #Sostituisci 'new' con il nome della nuova cartella | |
| RewriteEngine on | |
| RewriteRule ^/?old([a-z/.]*)$ /new$1 [R=301,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Specificare una homepage predefinita (index page) | |
| DirectoryIndex home.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Permettere l'accesso soltanto a specifici IP | |
| deny from all | |
| allow from 64.11.219.110 | |
| allow from 210.44.45.54 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Reindirizzare tutte le pagine di olddomain.com verso newdomain.com | |
| Options +FollowSymLinks | |
| RewriteEngine on | |
| RewriteCond %{HTTP_HOST} ^www.olddomain.com$ [OR] | |
| RewriteCond %{HTTP_HOST} ^olddomain.com$ | |
| RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Prevenire il caricamento di sottocartelle. | |
| #Questo comando va inserito nel file .htaccess del dominio primario | |
| RewriteCond %{HTTP_HOST} ^primary\.com$ [OR] | |
| RewriteCond %{HTTP_HOST} ^www\.primary\.com$ | |
| RewriteRule ^addon\.com\/?(.*)$ "http\:\/\/www\.addon\.com\/$1" [R=301,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Prevenire il caricamento del sottodominio. | |
| #Questo comando va inserito nel file .htaccess del dominio primario | |
| RewriteCond %{HTTP_HOST} ^subname\.primary\.com$ [OR] | |
| RewriteCond %{HTTP_HOST} ^www\.subname\.primary\.com$ | |
| RewriteRule ^(.*)$ "http\:\/\/www\.addon\.com\/$1" [R=301,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Non inserire mai www nel dominio. | |
| #Sostituisci 'example.com' con il tuo dominio | |
| RewriteEngine on | |
| RewriteCond %{HTTP_HOST} ^www\.(([a-z0-9_]+\.)?example\.com)$ [NC] | |
| RewriteRule .? http://%1%{REQUEST_URI} [R=301,L] |