Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice