Redirecting visitors to a maintenance page or other temporary page is an essential tool to have in your tool belt. Using HTAccess, redirecting visitors to a temporary maintenance page is simple and effective. All you need to redirect your visitors is the following code placed in your site’s root HTAccess:
Category Archives: .htaccess
.htaccess speed up site
Increase your page load times and save bandwidth with easy and really effective methods using apache htaccess directives. This module controls the setting of the Expires HTTP header and the max-age directive of the Cache-Control HTTP header in server responses. The expiration date can set to be relative to either the time the source file …
.htaccess hotlink protection
Hotlink protection of images Use this generator to create a .htaccess file for hotlink protection of your images and pictures. Hotlink protection can save you lots of bandwidth by preventing other sites from displaying your images.
create subdomains with .htaccess
Dynamic subdomains using htaccess This will render abcd.yourwebsite.com into yourwebsite.com/wor_out.php?url=abc
.htaccess Examples: Cookies, Variables, Custom Headers
Redirect Request ending in .html/ to .html RewriteEngine On RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.+)\.html/\ HTTP/ RewriteRule ^(.+)\.html/$ http://www.askapache.com/$1.html [R=301,L]
How To Optimize Your Site With GZIP Compression .htaccess
Setting up the server The “good news” is that we can’t control the browser. It either sends the Accept-encoding: gzip, deflate header or it doesn’t. Our job is to configure the server so it returns zipped content if the browser can handle it, saving bandwidth for everyone (and giving us a happy user).