The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Hi all;
I am on a cPanel box, and I have my forum installed on forums.domain.com, but as we all know, for cPanel boxes, forums.domain is exactly the same as domain.com/forums. Some clever visitors of mine figured that out and started to use that point of presence to access the forum instead. Generally speaking, this does not cause a major problem as it accesses the same DB etc. However, whenever the user tries to login, they get this ugly die('POST requests from foreign hosts are not allowed.'); output with no page decoration what so ever. This poses as a problem for me as I do not wish to have ugly 'debug-look-alike' pages like that sitting around for my visitor... I did some code probing and found that the message is thrown in init.php; which means any posting request (IE: login, post, reply, edit profile ... etc.) will all throw them the message. I've gone ahead and drafted a quick phrase named "baddomain" as follow Code:
We cannot allow POST requests from this remote location. This is placed in to prevent people from hacking / creating extra work load from external locations. The reason you are seeing this message is most likely because of an error in linking on our part, please do not take this message offensively. Please try your action again by doing so <a href="$vboptions[bburl]/index.php?$session[sessionurl]">here</a>! Code:
require_once('./includes/functions.php'); eval(print_standard_error('error_baddomain')); die(''); Thanks in advance! |
#2
|
||||
|
||||
![]() Quote:
|
#3
|
||||
|
||||
![]()
Yes, it is not available by default; hence why I had to come here to ask and leave that post of mine unanswered on .com
![]() Ultimately, I'd like to some how use that function to throw a more user friendly error message for the visitors, and as things stand right now, I don't see it happening. Do you have any experience with making it work? Hm.. idea flash... I wonder if I can just create a custom page using vbulletin's skinning system etc. and redirect it there instead... I'll give that a try now I guess... thanks ![]() There we go, I took out the line where it said die('POST....'); and replaced it with header("HTTP/1.0 301 Moved Permanently"); and header("Location http://url/baddomain.php"); where baddomain.php is just a page presenting the error message, and everything works great now ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|