htaccess codes to redirect domains to directories

The codes below deals with managing domains and directories through htaccess. These codes are to be added in the htaccess files present in the root directory for the domain. If you’re new to the term htaccess, you can read more about it in the post Introduction to .htaccess file. Redirect a directory or a page […]

Read More »
htaccess code to redirect a domain to https

The codes below can be used to redirect your visitors from http (normal/insecure) to https (encrypted/secure). These codes are to be added in the htaccess files present in root directory for the domain. If you’re new to the term htaccess, you can read more about it in the post Introduction to .htaccess file. You only […]

Read More »
www and non-www redirect codes for htaccess

The codes below are used to redirect your domain visitors from non-www version to www version of the site or vice versa. These codes are to be added in the htaccess files present in root directory for the domain. If you’re new to the term htaccess, you can read more about it in the post […]

Read More »
Introduction to .htaccess files

A .htaccess file is a file on the apache server that controls how your visitors interact with your website. You can also block access to the server using this file. Basically, a htaccess file is a configuration file for apache based servers. It is a very common file on the server. You might have come […]

Read More »
Mod_Security blocking IP upon editing post – .htaccess fix

Recently while editing my WordPress posts I found that previewing them would return me this error: I ignored this for temporary issue couple of times until I was no longer able to access my website from my PC. I immediately tried FTP and that was disabled as well. Then I tried accessing the blog through […]

Read More »