Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Weird AJAX Post?

Options
  • 28-01-2013 12:19am
    #1
    Registered Users Posts: 117 ✭✭


    Ok so I have an ajax form and it works if I use the domain www.mysite.com, but if I use the domain http://www.mysite.com or mysite.com the page will load but the login and register form wont work?

    Any suggestions?
    Tagged:


Comments

  • Closed Accounts Posts: 7,145 ✭✭✭DonkeyStyle \o/


    There are different session cookies for different subdomains.
    You're better off choosing one version of the URL and sticking to it.
    A .htaccess with something like this should sort it out.
    Options -MultiViews
    RewriteEngine On
    RewriteBase /
    Options +FollowSymLinks 
    RewriteCond %{HTTP_HOST} ^example.com [NC] 
    RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
    
    Or failing that, call your ajax pages using a relative URL (ie. don't specify the domain)


  • Registered Users Posts: 2,021 ✭✭✭ChRoMe


    T
    Or failing that, call your ajax pages using a relative URL (ie. don't specify the domain)

    You should really be doing this regardless....


  • Registered Users Posts: 117 ✭✭cirx08


    Already doing that, so that's not the problem...


  • Registered Users Posts: 117 ✭✭cirx08


    UPDATE - Problem is now solved...


  • Registered Users Posts: 27,161 ✭✭✭✭GreeBo


    Care to share for the next person who has the same issue?


  • Advertisement
  • Registered Users Posts: 2,021 ✭✭✭ChRoMe


    cirx08 wrote: »
    UPDATE - Problem is now solved...

    wisdom_of_the_ancients.png

    Make sure you leave a description of what fixed it.


Advertisement