- Redirect web site to SSL using .htaccess
- Redirect OLD domain to New using .htaccess
- Redirect yourdomain.com to www.yourdomain.com
- Disable PHP Execution in WordPress Uploads Folder
- Redirect users to Mobile Version or Desktop Version of Websites Based on Device using Apache mod_rewrite
- Enable htaccess (Rewrite Module) in Apache
- Apache Limit Access to a folder
Block All traffic
Create .htaccess file with
deny from all
Allow Only Specific IP
Create .htacces with following code
order deny,allow allow from YOUR_IP_ADDR_1 allow from YOUR_IP_ADDR_2 deny from all
If your IP changes, you can use CIDR format to white list IP range of your ISP.
Block Specific Browser/Version
To block visitors using specific version of browser, create .htaccess file with
RewriteCond %{HTTP_USER_AGENT} Firefox/34.0 [NC] RewriteRule .* - [F,L]
This will block all access from visitors using Firefox/34.0.