Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Weird AJAX Post?

  • 28-01-2013 12:19AM
    #1
    Registered Users, Registered Users 2 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,144 ✭✭✭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, Registered Users 2 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, Registered Users 2 Posts: 117 ✭✭cirx08


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


  • Registered Users, Registered Users 2 Posts: 117 ✭✭cirx08


    UPDATE - Problem is now solved...


  • Registered Users, Registered Users 2 Posts: 27,507 ✭✭✭✭GreeBo


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


  • Advertisement
  • Registered Users, Registered Users 2 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