PDA

View Full Version : Need some help with HTML....


HMBeaty
07-06-2006, 02:00 AM
I KNOW this can be done because I've done it before. Now I just can't remember how I did it. I need an index.html file that will redirect mysite.org to mysite.org/forum/ I've searched and couldn't find much without using META tags or htaccess files which neither worked. If you know how to do this, please paste the code up for me. And I'll know if its what I need as soon as I look at it. Thanks in advance. :)

Talisman
07-06-2006, 02:14 AM
I KNOW this can be done because I've done it before. Now I just can't remember how I did it. I need an index.html file that will redirect mysite.org to mysite.org/forum/ I've searched and couldn't find much without using META tags or htaccess files which neither worked. If you know how to do this, please paste the code up for me. And I'll know if its what I need as soon as I look at it. Thanks in advance. :)

How about this one, using javascript?

<html>
<body>
<p align="center">The page you are looking for is not here. Try:</p>
<p align="center">
<a href= "http://www.domain.com/htmljavascript.htm">
www.domain.com/htmljavascript.htm</a></p>
<p align="center">If you are not redirected automatically within a few
seconds then please click on the link above.</p>
<script language="JavaScript"><!--
setTimeout('Redirect()',4000);
function Redirect()
{
location.href = '../htmljavascript.htm';
}
// --></script>
</body>
</html>

HMBeaty
07-06-2006, 02:31 AM
Well, no, thats not it, BUT, I did get it to temporarily redirect using....


<html>
<head>
<META HTTP-EQUIV="REFRESH" content="0;URL=http://www.redlinemotorsports.org/forum/index.php">
</head>
<body>
</body>
</html>

Talisman
07-06-2006, 02:35 AM
I couldn't find anything else that didn't use the META refresh or .htaccess, either. As I understand, that won't work in all browsers.

peterska2
07-06-2006, 08:29 AM
I've always used htaccess to do this, and the only problem I ever came across was that htacess and cell phones (wap) don't go together. But anyone who uses them would probably use the ful URL to the page anyway.

harmor19
07-06-2006, 08:35 AM
Try this htaccess


RewriteEngine On
RewriteRule ^(.*)$ http://www.redlinemotorsports.org/forum/$1 [L,R=301]

Behemoth
07-08-2006, 06:13 PM
Or make an index.php page instead of an index.html, and just use:


<?php
header("Location: /forum/");
?>