Log in

View Full Version : Constant URL Redirect from Root Folder to Forums Folder


NashChristian
07-14-2007, 11:35 PM
Hello.

I'm recently new to vBulletin, but love it so far!

My issue is this:

When I installed vBulletin, they recommended that you keep your vBulletin installation within a Forums folder, instead of slamming it all directly into your root folder. I'm fine with this as one day I hope to build a site around the forums, however at this time, the forums are all that I have up and running, which probably will be the case for the next year or so.

My website is: http://NashvilleChristian.com however since I currently have nothing other than the forums, people must currently type in: http://NashvilleChristian.com/Forums.

I'm looking for some sort of script or URL redirect that I can put in my root folder so that all people will have to type in is NashvilleChristian.com and they will go directly to my forums folder at NashvilleChristian.com/Forums.

This seems like it should be simple, but I'm unsure how to do it. Can anybody help me with this?

Thanks a bunch!
Jeff

EnIgMa1234
07-14-2007, 11:37 PM
Look for redirects in your cpanel (If you have cpanel of course ;))

NashChristian
07-14-2007, 11:45 PM
I thought of that, but I was concered that if I do that, then I'll have problems if I store any pages or elements, images, files, mp3s, etc... outside of the forums folder in the root. I want to still be able to use the root folder for storage, but I don't have an active index page in there to greet viewers.

I don't want to do a welcome page where they are instructed to Click Here to enter the forums. I just want them to be redirected to my forums, smooth and automatic.

Thanks for the suggestion!
Jeff

EnIgMa1234
07-14-2007, 11:46 PM
Adding a redirect will not affect the other files ;)

Kirk Y
07-14-2007, 11:53 PM
I use a PHP Redirect. Just stick the following in an index.php file in your root:

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://yoursite.com/forum/");
?>

NashChristian
07-15-2007, 12:03 AM
Kirk,

That's just what I needed!

Thanks a lot!

Jeff

Kirk Y
07-15-2007, 12:06 AM
No problem.