Let's get our geek on. +1-406-844-2550|info@nivindel.com

Apache webserver .htaccess file tips and tricks

This is a set of short code snippets to control various methods of URL redirection using .htaccess files for Apache/Linux.

To place a site offline with the exception of a particular static IP address, place this content in your .htaccess file:

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

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

To redirect a URL which is really just a querystring — Useful for WordPress page redirects.

2017-03-10T13:09:19+00:00 August 31st, 2011|Linux|