SPLForums
04-08-2005, 05:46 AM
Hi
Can somebody please explain in very simple term how to do the following as I am a complete beginner.
I want my forum to link to my domain name instead of a subdirectory of /forums
i-e at the moment my domain name www.mydomain.com looks at an old portal that im not going to use and my new forms are at www.mydomain.com/forumss
I now want when people go to www.mydomain.com to see the forums imediatley
I hope this makes sense
CyberAlien
04-08-2005, 08:03 AM
Create index.php with content like this:<?php
$url = 'http://www.mydomain.com/forum/';
header('HTTP/1.1 301 Moved Permanently');
header('Location: ' . $url);
header('Connection: close');
?>and it will automatically redirect to forum.
Or move forum files to root directory.
pitergreen
04-08-2005, 09:07 AM
There are so many ways that you can do this... I think that the simpliest way would be to create a .htaccess file in the public_html directory and add "DirectoryIndex forums/index.php" in it (without quotes).
Or move forum files to root directory.
Not the brightest idea...
DavidWHP
04-08-2005, 11:18 AM
You can also create a frame in the first page...
place this file in your - /home/account/www/"here"
name> index.html
-----copy all this below----
<html>
<head>
<title>My Forum Online</title>
</head>
<frameset cols="150">
<frame name="contents" target="main" src="yourlinkhere">
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
post if it worked for you
CyberAlien
04-08-2005, 12:22 PM
Frameset is a very bad idea. It will cause problems with search engines, users who try to bookmark topics, etc..
Originally posted by pitergreen
Not the brightest idea...
Why not? He wrote that forums are new, so I don't see anything preventing from moving it. If forum was old then it would be a bad idea because users have bookmarks set to old url and search engines spidered old urls, but his forum is new.
Jamie Harrop
04-09-2005, 06:31 AM
SPLForums,
The best way to do this would be to move the forums to the root folder, usually public_html. This would be the long term method, but will be the one that runs of the risk of causing problems.
The only other option is to redirect like others have explained here.
I will second the thought of saying that a frameset is a very bad idea. Stay as far away from frames as you can. See http://www.htmlhelp.com/faq/html/frames.html#frame-problems and http://www.htmlhelp.com/faq/html/frames.html#frame-search
smullen
04-09-2005, 08:26 AM
The only good way to do it is move it your web "root" directory
ie from ~/bob/public_html/forum to ~/bob/public_html/
and you'll probably have to edit a config file before it'll work again
but anything you do is going to break something just a liitte....
mouldy_punk
04-09-2005, 08:45 AM
Not if you just redirect to yourdomain/forums eg;
index.php in your root dir:
<?PHP
Header("Location: http://www.yourdomain.com/forums");
?>
Then when people visit yourdomain.com, they will automagically be redirected to /forums :)