The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

redirect to index for maintenance?

Discussion in 'General Discussion' started by thared33, May 1, 2010.

  1. thared33

    thared33 Registered

    Apr 15, 2010
    Likes Received:
    Trophy Points:
    I haven't found something like this in cpanel, so i tried an htaccess file with the following code:

    Options +FollowSymlinks
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !/index.html$
    RewriteCond %{REMOTE_HOST} !^xxx\.xxx\.xxx\.xxx

    RewriteRule $ /index.html [R=302,L]

    But there's a problem. On the index page, I've got to have some particular scripts and images load. With the above, it'll redirect everyone back to the index file no matter which directory/page they try to access, but the images and the scripts on the index page aren't being pulled that are necessary for the page.

    I'm trying to close down my website with a fancy index because it's opening soon. How would I go about getting the index to load everything it should and have everything redirected back to the index.html file?

Share This Page