Example .htaccess Apache Redirect

From time to time we will install a website and want it to redirect to a directory or file inside of it’s root directory besides the default index.htm, index.html, or index.php file.  Here’s an example of how this can be achieved using .htaccess with Apache.

redirect /index.html http://www.yourwebsite.com/sitefile.html

As you can see, when a browser pulls this website up with the .htaccess file sitting in it’s root directory it will then transport the visitor to http://www.yourwebsite.com/sitefile.html instead.  Pretty cool trick for doing a quick redirection that won’t hurt your SEO.

Related Posts:

Filed under Web Development, Web Hosting · Tagged with ,

blog comments powered by Disqus