Skip to content

Instantly share code, notes, and snippets.

@robi052
robi052 / .htaccess
Last active December 27, 2020 15:17
htaccess tips and tricks what I'm using
#forward http to https and non-www to www with only 1 hop
#hop test https://varvy.com/tools/redirects/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</IfModule>
#Block Wordpress authors scan
<IfModule mod_rewrite.c>