HTACCESS universal/global extension redirect tutorial

Heads up: this should be used if you have recently switched your programming of choice. Example: all of your .html file extensions have been globally renamed to .php

Simply copy and paste this into your .htaccess file.

redirectMatch 301 ^/(.*)\.html$ http://www.domaininquestion.com/$1.php

Make sure to upload this file to the folder you would like this change to apply to or just upload to root to make all files do it.

HTACCESS single file redirect tutorial

Heads up: HTACCESS redirects are for LAMP server environments only. Microsoft IIS or any other Operating System will assume you are out of your mind if you upload this file to root.

But Ivan, what's the benefit of HTACCESS redirects? it's picked up by search engines much more easily than javascript, and integrated 10 times faster. The PHP header location command does the same thing, but it also isn't as time efficient.

      1. create a new text file, and rename it to 1.htaccess.
      2. connect to your FTP's root.