This file contains 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
RewriteEngine on | |
# Ensure all directory URLs have a trailing slash. | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} !\/$ | |
RewriteCond %{REQUEST_URI} !\/[^\/]*\.[^\/]+$ | |
RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301] | |
# Same for HTTPS: | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} !\/$ |
This file contains 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
# Compress text, html, javascript, css, xml: | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/x-javascript |
This file contains 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
RewriteEngine on | |
# Redirect to domain without www. | |
RewriteCond %{HTTPS} off | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule .* http://%1%{REQUEST_URI} [R=301,L] | |
# Same for HTTPS: | |
RewriteCond %{HTTPS} on | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule .* https://%1%{REQUEST_URI} [R=301,L] |
This file contains 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
# Esegui questo comando se vuoi cancellare tutti i commenti in attesa di moderazione (pending). Per lanciare il comando per prima cosa seleziona il tuo database, poi naviga nella tab SQL, inserisci la query e premi Esegui. | |
DELETE from wp_comments WHERE comment_approved = '0' | |
# Esegui questo comando se vuoi cancellare tutti i commenti precedentemente approvati. | |
DELETE from wp_comments WHERE comment_approved = '1' | |
# Esegui questo comando se vuoi cancellare tutti i commenti marcati come SPAM. | |
DELETE from wp_comments WHERE comment_approved = 'spam' | |
# Esegui questo comando se vuoi cancellare tutti i commenti nel cestino. |
This file contains 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
function rimuovi_campo_url($fields) { | |
unset($fields['url']); | |
return $fields; | |
} | |
add_filter('comment_form_default_fields','rimuovi_campo_url'); |
This file contains 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
<?php if (is_single() && in_category(array(###))) { echo '<meta name="robots" content="noindex, follow">'; } ?> |
This file contains 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
RewriteEngine on | |
RewriteCond %{HTTP_REFERER} !^$ | |
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?evemilano.com [NC] | |
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L] |
This file contains 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
location ~ .(gif|png|jpe?g)$ { | |
valid_referers none blocked .ilmiosito.com; | |
if ($invalid_referer) { | |
return 403; | |
} | |
} |
This file contains 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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} -f | |
RewriteCond %{REQUEST_URI} !/images/alternative-image.jpg$ | |
RewriteRule \.(jpg|gif|png)$ - [NC,C] | |
RewriteCond %{HTTP_REFERER} bilderr\.com [NC,OR] | |
RewriteCond %{HTTP_REFERER} pictures-images\.com [NC,OR] | |
RewriteCond %{HTTP_REFERER} freeimages-de\.bloggum\.com [NC,OR] | |
RewriteCond %{HTTP_REFERER} zaggla\.com [NC] | |
RewriteRule . /images/alternative-image.jpg [T=image/jpg,L] |
This file contains 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
# è possibile definire una cartella da bloccare | |
# location = /immagini/vietato_rubare.png | |
# oppure i tipi di file | |
location ~ \.(gif|png|jpg|jpeg|JPG|GIF|JPEG|PNG)$ { | |
valid_referers none blocked ilmiosito.com *.ilmiosito.com; | |
if ($invalid_referer) { | |
rewrite \.(gif|png|jpg|jpeg|JPG|GIF|JPEG|PNG)$ http://www.ilmiosito.com/immagini/vietato_rubare.PENG redirect; | |
# alternativa | |
# rewrite ^(.*)$ http://ilmiosito.com/immagini/vietato_rubare.png last; | |
} |