|
|
| Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate. |
|
|||||||
| TouchArcade.com - iPhone Game Reviews and News |
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
macrumors 6502
Join Date: Aug 2005
Location: Scotland
|
AJAX, base href, and www. problems... need some suggestions
I'm making a website where people can play flash games and save high scores etc, I use AJAX to save (and load) the scores so they can save their score without interrupting their game. I also use mod_rewrite rules to give friendly urls.
But, an example URL is http://www.standbygames.com/games/spacegame/, which appears to the browser to be in the /games/ folder, so I use <base href="http://www.standbygames.com/" /> so all the CSS etc that's in the root level loads, and that's also where the highscores page is loaded from via AJAX. Thing is, (in Safari and Firefox at least) if I you miss out the www. and goto, for example URL="http://standbygames.com/games/spacegame/"]http://standbygames.com/games/spacegame/[/url], the browser seems to think it's loading from a different server and pops up a white box in the corner saying "Exception caught while loading insert_highscore.php?...: Permission denied". So I suddenly require everyone uses www. at the start of the address, or all the AJAX just stops working! I was wondering what I can do to best avoid this? I suppose I could use some mod_rewrite rule to force the www. to be there, but I'd rather not need to do that... and I don't know what rule to use that won't interfere with my other rules? Sorry if that wasn't explained very well, thanks for any help! |
|
|
|
|
|
#2 | ||
|
macrumors 6502a
Join Date: Jan 2005
|
Quote:
Quote:
__________________
Canto Pod: Get song lyrics on your iPod and iTunes, for free. (Mac + PC) |
||
|
|
|
|
|
#3 |
|
Thread Starter
macrumors 6502
Join Date: Aug 2005
Location: Scotland
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|