Web Hosting Talk







View Full Version : Apache Redirect?


tacoX
08-10-2004, 01:48 AM
Well, I need a simple redirect apache script, so when the user goes to
www.clangv.com
it forces them to www.clangv.com/sof

SSla - KoRRupt
08-10-2004, 01:55 AM
Well.. if you wanted to, you could ue Javascript..

<script language="JavaScript">
window.location = "yoursite";
</script>

Put that in your head of your index page.

amc-james
08-10-2004, 09:50 AM
or something like this


<HTML>
<HEAD>
<META HTTP-EQUIV="REFRESH" CONTENT="0;URL=/sof">
</HEAD>
<BODY>
<CENTER>Redirecting....</CENTER>
</BODY>
</HTML>

kneuf
08-10-2004, 11:09 AM
if you have php, u can do this:

header("Location: h t t p : / /mysite.com/sof");
exit();
?>

replace "h t t p : / / " with "http://"
or in apache, the format for a redirect is:

Redirect[tab]/oldfile[tab]/newfile

just replace where neccessary and hit tab what it says [tab].

AlexV
08-10-2004, 04:04 PM
Look up Apache's RedirectPermanent directive.