Support Forums
Making default domain redirect to forums - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Webmaster Support (https://www.supportforums.net/forumdisplay.php?fid=36)
+---- Forum: Website Development (https://www.supportforums.net/forumdisplay.php?fid=43)
+---- Thread: Making default domain redirect to forums (/showthread.php?tid=311)

Pages: 1 2


Making default domain redirect to forums - Jake - 10-05-2009

Okay so I have a host and a domain, but my forums are located at www.domain.com/forums, however obviously www.domain.com will direct to my default index page. Since I'm not done with my index page how can I make it redirect to www.domain.com/forums?

Thanks.


RE: Making default domain redirect to forums - Gaijin - 10-05-2009

You can do it with PHP
Code:
header("Location: forums/index.php");



RE: Making default domain redirect to forums - Elektrisk - 10-05-2009

Quote:<html>
<script>
location = "http://www.paulpotts.com.au";
</script>
</html>

Source: http://inspiredesign.com.au/Redirect-Script


RE: Making default domain redirect to forums - Jake - 10-05-2009

Weird... when I go to http://www.domain.com/index.html the redirect works, but when I go to http://www.domain.com it doesn't..

Anyone know what to do?


RE: Making default domain redirect to forums - Elektrisk - 10-05-2009

Check this out.
http://www.web-source.net/javascript_redirect.htm


RE: Making default domain redirect to forums - Gaijin - 10-05-2009

(10-05-2009, 08:13 PM)Jake Wrote: Weird... when I go to http://www.domain.com/index.html the redirect works, but when I go to http://www.domain.com it doesn't..

Anyone know what to do?

post up the source...

and try putting the redirect command into a function and then call it on body load
Code:
<body onload="function()">



RE: Making default domain redirect to forums - Jake - 10-05-2009

Well, sorry I don't really know PHP.. I'm just trying to make a simple redirect.

Can someone just post a code snippet of a full index.html page that simply redirects?

Thanks.


RE: Making default domain redirect to forums - Gaijin - 10-05-2009

(10-05-2009, 08:22 PM)Jake Wrote: Well, sorry I don't really know PHP.. I'm just trying to make a simple redirect.

Can someone just post a code snippet of a full index.html page that simply redirects?

Thanks.

Code:
<?php
header("Location: http://yourdomain.com/forums/index.php");
?>

save the above as index.php and change the path after "Location:" to the one you want it to redirect


RE: Making default domain redirect to forums - Jake - 10-05-2009

Edit: got it working. Thanks.


RE: Making default domain redirect to forums - Gaijin - 10-05-2009

(10-05-2009, 08:26 PM)Jake Wrote: Edit: got it working. Thanks.

no problem man if you have any questions about php/javascript/html/css I'm here for you..

ps:
Thank you Blackhat