Reply
Sat 8 Nov, 2003 02:19 pm
I am hosting a forum for a friend at the address of mrbobdouglasDOT[com]/sickforums
They have a shortcut url at sickforums.2ya.com
When you log in, and view a post that is labeled 'New posts', it does not set it as 'New posts' after you read it and shows up as not been read before.
However, when you goto the exact URL, it will work fine.
Ideas? I was thinking about adding code into the index file to make it redirect to the real url if they are using the shortcut, but I am not sure of the code to do it..
Thanks
Im using the latest version of phpbb.
It will only support one URL for the cookie unless you do a complicated install involving duplicate user databases etc. Choose which one you want the cookie to support and specify that URL in the administration panel.
So there isn't a way to check if the domain=something.com and if domain=something.com it will redirect to something else?
Sure, I even wrote you a quick javascript that does that:
Redirect if the code is called from the wrong page
Thing is, that's going about it the wrong way. The links should simply be setup correctly and there will be no need for a workaround.
Basically what I am saying is to not create the problem instead of creating workarounds for the problem.
The script I just posted won't work if Javascript is turned off, for example.
I'm writing another quick script related to this right now you can find it in the script portal I linked to above.
"Thing is, that's going about it the wrong way. The links should simply be setup correctly and there will be no need for a workaround."
- Even when using the exact URL(which I am) free subdomain hosting sites just as 2ya(like i am using on mine) won't work like that.
Ok, that redirection system uses frames. You can simply use code on your page to break out of frames.
Break frames script