"POST requests from foreign hosts are not allowed"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Meltingfire
    Senior Member
    • Feb 2003
    • 129

    "POST requests from foreign hosts are not allowed"

    Im using vbIndex at www.site.com and vBulletin at "forum.site.com" and therefor i get the message "POST requests from foreign hosts are not allowed." when someone tries to login from vbindex page.

    Is there someway to solve this? Maybe a settings in the admin cp for allowed sites or can i do some changes to the php or something? What i would like to do is to allow everyone from ".site.com"
  • Zachery
    Former vBulletin Support
    • Jul 2002
    • 59097

    #2
    Are you running 3.0.6 ?

    Comment

    • Steve Machol
      Former Customer Support Manager
      • Jul 2000
      • 154488

      #3
      We do not support vBIndex here or forums running hacked code. Please post in the appropriate forum at vbulletin.org for help.
      Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
      Change CKEditor Colors to Match Style (for 4.1.4 and above)

      Steve Machol Photography


      Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


      Comment

      • Meltingfire
        Senior Member
        • Feb 2003
        • 129

        #4
        Yes im running 3.0.6, i think it was first introduced in 3.0.5.

        I know that you dont support the hacks but this is me asking you how to make a change to init.php (since thats where you do the check) so that i can allow posts from another site.

        Lets say it wasnt vbindex, but my own homemade site that i want to be able to send logins from to vbulletin. Shouldnt i be able to do that?

        Comment

        • Zachery
          Former vBulletin Support
          • Jul 2002
          • 59097

          #5
          If you are using all 3.0.6 fresh unhacked files, it should work fine, this bug was fixed in 3.0.5

          Comment

          • Meltingfire
            Senior Member
            • Feb 2003
            • 129

            #6
            Well i downloaded 3.0.6 12 hours ago... and its not working....
            The init.php even says "vBulletin 3.0.6"

            I found the bug now!

            You use "www" in the preg_replace on http_host
            PHP Code:
            $http_host preg_replace('#^www\.#i'''$http_host); 
            and since my forum is on "forum.site.com" it didnt work. I changed it to "forum" instead
            PHP Code:
            $http_host preg_replace('#^forum\.#i'''$http_host); 
            and now it works. My vbindex is running on www .site.com
            Last edited by Meltingfire; Sat 22 Jan '05, 5:23am.

            Comment

            • Alien
              Senior Member
              • Jul 2000
              • 325

              #7
              Excellent. Is there a way to make it www AND forum if I wanted it to? This should resolve my problem then as well.
              -Jason / WTF.com

              "I think I've been quite clear that the new style will be in vB4." - Allen Lin / February 16, 2012

              Comment

              • ajaspers
                Senior Member
                • Sep 2003
                • 132
                • 3.8.x

                #8
                Try
                PHP Code:
                 $http_host preg_replace('#^(forum|www)\.#i'''$http_host); 

                Comment

                • Alien
                  Senior Member
                  • Jul 2000
                  • 325

                  #9
                  Thank you SO kindly! I'll give that a whirl!
                  -Jason / WTF.com

                  "I think I've been quite clear that the new style will be in vB4." - Allen Lin / February 16, 2012

                  Comment

                  • NJTackle
                    New Member
                    • Oct 2003
                    • 2
                    • 3.0.0 Beta 7

                    #10
                    Having same problem and would like to try this solution. Where/what file do I change this in?

                    Thanks!
                    Timing Is Everything!

                    Comment

                    • Alien
                      Senior Member
                      • Jul 2000
                      • 325

                      #11
                      /includes/init.php

                      -Jason / WTF.com

                      "I think I've been quite clear that the new style will be in vB4." - Allen Lin / February 16, 2012

                      Comment

                      • Realystic
                        Senior Member
                        • Feb 2003
                        • 140

                        #12
                        I found another issue that causes this error,

                        if you own domain.com .. then have domain.net and domain.org registered but parked on your domain.com domain name, if someone tries to login to your .net or .org, you'll get the same error you guys are having above. At least that was what I had when I moved back to my .com and people till typing the old domain name in which I had parked.

                        Anyway I hope that helps a bit... I setup a new account with the other domains and then just did a meta tag refresh/404 pages on the old site, with a 2 second delay and my traffic is moving smoothly on the new site again.

                        Robert - Music is my caffeine!

                        Comment

                        • Nam
                          Senior Member
                          • Oct 2001
                          • 212

                          #13
                          Originally posted by Meltingfire
                          You use "www" in the preg_replace on http_host
                          PHP Code:
                          $http_host preg_replace('#^www\.#i'''$http_host); 
                          and since my forum is on "forum.site.com" it didnt work. I changed it to "forum" instead
                          PHP Code:
                          $http_host preg_replace('#^forum\.#i'''$http_host); 
                          and now it works. My vbindex is running on www .site.com
                          Meltingfire, just want to let you know that you post did HELP me a lot, I had the exactly problem and thank to you, it's SOLVED .

                          Thank you again.
                          My forum's vB3 version: 3.6.8

                          Comment

                          • peterska2
                            Senior Member
                            • Oct 2003
                            • 8869
                            • 3.7.x

                            #14
                            I'm having this error on a multiple domain setup.

                            Comment

                            • xxskullxx
                              New Member
                              • Jul 2002
                              • 18

                              #15
                              Thanks for the fix. I was having the same exact problem.

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...