Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-06-2009, 01:59 PM
BozzaJos BozzaJos is offline
 
Join Date: Feb 2006
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Redirecting root url to sub-directory

Hey guys and gals,

I've got a question and I am really hoping that someone can help me out. My new site is almost finished and this is the last hick-up I need to figure out before throwing the site in the air.

My old/current situation is that my site only consists of the Forums, vBulletin software of course. If you visit the root url, it goes directly to the Forums.

I've almost finished creating a new site, a frontpage instead of only a forum. The new site is located in a sub-directory. Due to the problem of having a lot of invalid links, I can't move the Forums to a sub-directory. So I will change the Forums index file to forums.php and leave the new site in the sub-dir. That means of course that if someone visits the root url, he/she should be redirected to the sub-dir.

My question is: What is the most logical way to achieve that? Best, proper way when you look at coding but SEF as well. I heard someone saying that the best way is to get .htaccess to redirect but I have no idea how. I do use the .htaccess file in the root directory and the sub-dir of the new site as well. The new site was created using the Joomla software by the way.

Can anyone help me out? It is the last step to perform before putting the site online for everyone. I know I could create a index.html/php file and use a redirect function in there but is the .htaccess file more friendly?
Unfortunately, my knowledge is very limited so I hope someone can give me the exact command(s).

Thank you in advance and if you need to know anything else, please reply as well.

Take care,

Bozza
Reply With Quote
  #2  
Old 04-06-2009, 02:12 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think .htaccess file edit is what you need. Please read http://www.webweaver.nu/html-tips/web-redirection.shtml and let us know your findings.
Reply With Quote
  #3  
Old 04-06-2009, 02:21 PM
fattony69 fattony69 is offline
 
Join Date: Jun 2007
Location: Philly
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mr-Moo is right or you could mess with the Apache (for advanced users though).
Reply With Quote
  #4  
Old 04-06-2009, 04:50 PM
BozzaJos BozzaJos is offline
 
Join Date: Feb 2006
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Many thanks for the quick answer guys!

I do however got some problems.

I guess "To move a single page" option or "To move an entire site" are the options for me right?

When I try "Redirect 301 / http://www.mysite.com/home"
I get an error that there is an eternal loop and Internet Explorer shows that I'm at http://www.mysite.com/home/home/home...home/home/home

When I try "Redirect 301 /index.php http://www.mysite.com/home"
Nothing happens. It just load index.php

Anyone got an idea to help me out?
Thanks for all the effort guys!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:36 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03805 seconds
  • Memory Usage 2,183KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete