Redirecting every page on the website to index.html

Issue :

While some construction is going on the site, all pages on the website should go to the index page.

Solution :

This can be easily achieved by using the following code in your .htaccess file :

< IfModule mod_rewrite.c >
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
< /IfModule >

  • Share/Bookmark

Filed Under: Quick fixesTechnical

Tags:

About the Author: InstaCarma is a provider of Enterprise Class Solutions for the Hosting Industry

RSSComments (1)

Leave a Reply | Trackback URL

  1. [...] This post was Twitted by InstaCarma [...]

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes