View Categories

Securing your DEV site(s) when not in use

A site that’s under development may be an easy target for hackers. Here’s a quick and easy way to secure it using your .htaccess file.

Suppose you have set up a subdomain, https://teal.acastudyabroad.com, for development purposes. Add the following code block at the top of the .htaccess file in your site’s web root, in order to redirect the teal site to the live site (www).

# IN ORDER TO TURN OFF THE TEAL SITE, SIMPLY CHANGE 'FALSE' to 'TRUE' IN LINE 2
<IF "false">
RewriteEngine On RewriteBase /
RewriteRule ^(.*)$ https://www.acastudyabroad.com/$1 [L,R=301,NC]
</IF>
# Your normal htaccess stuff goes below

Powered by BetterDocs