Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 09-08-2002, 04:19 AM
Darth Cow's Avatar
Darth Cow Darth Cow is offline
 
Join Date: Nov 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Caching of Location headers

Ok, I'm having this really annoying problem with this program I'm writing.

It's a link of sites. I have a page go/index.php that takes the $QUERY_STRING as the site url to go to, increments the hit count in a database, and then forwards (using header("Location: $url")) the user to the url. Sound simple enough?

I'm getting this really annoying problem now with my browser. At first, I had this running fine on one server, but I hadn't setup the MySQL yet, so I was just redirecting back to the links page with my location headers (I was even doing a relative URL ). I was linking to go?http://www.site.com. Now, I'm having trouble after I've moved over the program to new server with the MySQL. Whenever I click on one of the links, it sends me back to the old links page! It doesn't even appear to download the right page. I tried clearing my history, temp internet files, but all to no avail (I'm in IE 6). It did, however, do everything right when I linked to go/?http://www.site.com. It's like it's identified that url in a link to redirect to one page and doesn't even bother checking for alternatives. This problem even occurs when I link to a page not even used on the first version - go?http://random.site.blah.com .

Anyone have a clue what's going on?
Reply With Quote
  #2  
Old 09-08-2002, 04:39 AM
Darth Cow's Avatar
Darth Cow Darth Cow is offline
 
Join Date: Nov 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, now it appears that anyone who goes to the page gets redirected to the wrong place! This is getting really wierd - anyone have a clue?
Reply With Quote
  #3  
Old 09-08-2002, 07:55 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

has to be something that is hardcoded into the mysql or some fixed code that you're not changing... at least it seems that way by the way you're describing it... regards...

g-force2k2
Reply With Quote
  #4  
Old 09-08-2002, 04:48 PM
Darth Cow's Avatar
Darth Cow Darth Cow is offline
 
Join Date: Nov 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by g-force2k2
has to be something that is hardcoded into the mysql or some fixed code that you're not changing... at least it seems that way by the way you're describing it... regards...

g-force2k2
That makes sense, but then it doesn't considering that I don't mention the URL for the old site anywhere in my code! I attached the redirection page in case anyone can make any sense of it.

I should note that I plan on removing the or die() bit for and making the query @, so that it'll just send you back to the links page if there is any trouble.
Attached Files
File Type: php index.php (259 Bytes, 7 views)
Reply With Quote
  #5  
Old 09-08-2002, 08:09 PM
Darth Cow's Avatar
Darth Cow Darth Cow is offline
 
Join Date: Nov 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I figured it out!

The server must be setup to redirect all folder lookups without the following slash to mtgnews.com/ whatever, not to server I'm working on right now (what will soon be the mtgnews.com server).

Ah... I feel much better knowing what's wrong . Sorry for bothering everyone .
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04046 seconds
  • Memory Usage 2,211KB
  • Queries Executed 12 (?)
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_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
  • (1)postbit_attachment
  • (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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete