PDA

View Full Version : Changing the root directory? +REP



myke
11-11-2008, 04:59 PM
Hey guys, say I wanted my site to go to maintenance page instead of index.html

How would I do it?

thx x

Jxhn
11-11-2008, 05:08 PM
Just put this in index.html

<script>
window.location="maintenancepage.html";
</script>
There's a way to do it with meta tags, but I can't remember it.

OR put this in index.php


header("Location: maintenancepage.html");

L?KE
11-11-2008, 05:16 PM
Or on cpanel go to Domains > Redirects.

Select your domain from the drop down and put maintenancepage.html in the 'Redirects to-->' Box. Leave redirect with or without www ticked.

Meti
11-11-2008, 08:52 PM
I usually do this through cPanel. Redirects smooth and good :P

Hypertext
11-11-2008, 09:04 PM
Use cPanel, as you don't want to go through all pages adding that code. Alternatively use your .htaccess, and make a rewrite rule.

FYI the <meta> tag way is: <meta http-equiv="refresh" content="0;page.html" />

Bold being seconds until it redirects, underline being where to redirect to.

Want to hide these adverts? Register an account for free!