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 09-26-2008, 06:28 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Base URL doesn't play nicely with subdomains?

I recently copied my live site to my test site to do a test upgrade to 3.7.3. All went well but now I'm playing with updating all the templates. One thing I was hoping to change was how I've always had to put full paths in the navbar because of my site setup. I have a main page at www.mysite.org/index.php and then I have my forums at www.mysite.org/forums/. The main home page at www.mysite.org/index.php is a basic vb looking page where I just post some site news and then some recent threads on the bottom. It has the basic vb navbar template and if I left the navbar at default, it would link to member.php and search.php etc. and none of those exist in that directory, so I always went in and changed the paths to "/forums/member.php" and "/forums/search.php" etc. That worked fine for most things but was always a PITA. So, I saw a post by Dismounted suggesting I add the following line in the headinclude template:
HTML Code:
<base href="http://test.mysite.org/forums/" />
I did that and then I noticed that when I was on my forums, even though the page source would say the link was to "test.mysite.org/forumdisplay.php", if I clicked on it, it would go to "www.mysite.org/forumdisplay.php"!?! Same thing if I went to a forumdisplay.php page and clicked on a link to a showthread.php page - even though the page source said "test.mysite.org/forums/showthread.php", I ended up on my live site. So, I took that base tag out of the headinclude and all was fine again.

I have now just added the base tag into my home page (head section) at www.mysite.org/index.php and am getting the same problem with all the links to showthread pages there (and links to member pages there). As I said, the page source is fine, hovering over the link says it will go to my test site, but clicking on the link takes me to my live site. The only htaccess I have in my test subdomain is to password protect the test site (per the vb agreement). Can someone explain what I'm doing wrong here?
Reply With Quote
  #2  
Old 09-26-2008, 11:04 PM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do you have your paths set to in the adminCP

AdminCP -> vBulletin Options -> Sitename URL Contact Details -> Forum URL

It should be http://www.mysite.org/forums if using your above example and your Homepage URL should be http://mysite.org/index.php
Reply With Quote
  #3  
Old 09-26-2008, 11:54 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FRDS View Post
What do you have your paths set to in the adminCP

AdminCP -> vBulletin Options -> Sitename URL Contact Details -> Forum URL

It should be http://www.mysite.org/forums if using your above example and your Homepage URL should be http://mysite.org/index.php
That is exactly what I have. (Well, for my test site, it says test.mysite.org, not www.mysite.org.)
Reply With Quote
  #4  
Old 09-27-2008, 12:14 AM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, thats strange, i've always put my forums in /forums like you, and ust entered that path there and never had an issue, you can always try to prefix $bboptions[bburl]/ to the links (i think that variables right, not 100% sure on it)

ex:
Code:
$bboptions[bburl]/usercp.php
Reply With Quote
  #5  
Old 09-27-2008, 12:46 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, I know how I can add either /forums or $vboptions[bburl]/ in front of the link, but I was hoping to avoid that. Here is the thread where I brought this up before in response to someone else's question - Chdir/$vbulletin->options['homeurl'] trouble. The OP talks about how he has to change his navbar links (in post 1 & 5), I respond saying I have the same setup and I have to do that also (post 3), and then Dismounted talks about using the base tag instead (in post 6). But, as I said in my first post, instead of the links going to my test site (like the hover url says they will), it is going to my live site. The only thing I can think of is that my test site is setup as a subdomain.
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 10:50 PM.


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.03977 seconds
  • Memory Usage 2,204KB
  • 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)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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