Apache webserver .htaccess file tips and tricks.

Place a site offline with the exception of a particular static IP address.

Copy to Clipboard

Redirect all web traffic from http:// (port 80) to https:// (secure – port 443).

Copy to Clipboard

Redirect all web traffic from http://www.olddomain.com to http://www.newdomain.com while preserving the remainder of the URL path.

Copy to Clipboard

Redirect a URL which is really just a query string — Useful for WordPress page redirects.

Copy to Clipboard

For WordPress websites, block access to wp-admin.php and xmlrpc.php except for a static IP address.

Copy to Clipboard

Share This Information