Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3673586
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:45:05+00:00 2026-05-19T02:45:05+00:00

I found a couple of posts that solved this problem for others, but not

  • 0

I found a couple of posts that solved this problem for others, but not for my situation. I would like to get the best solution possible for my cross server ajax call.

Here’s the situation. I have two urls, http://www.mysite.com and members.mysite.com. The first site is wordpress driven and the second is codeigniter driven, I refer to these sites as wordpress side and codeigniter side. The codeiginter side has a calendar page of events that is created as a module so all any page has to do is include the file and all javascript and stuff comes with it. On the wordpress side, we have to include one of these files into a page, but the problem is that the codeigniter side is ajax driven, so when it does the ajax calls, the calls will be cross server. Here are the solutions that I’ve seen on the web with the cons in my situation:

  1. jsonp – This doesn’t support POST data.
  2. simple server side proxy http://devlog.info/2010/03/10/cross-domain-ajax/ – Since the javascript is shared between the two urls, I’ll have to create the same file on both the wordpress side and the codeigniter side. This means duplicate code, performance issues, and the fact that if the user is on the codeigniter side, the request has to make an extra page call to get the data.
  3. Symbolic links – since both of these reside on the same server, is it possible to make a symbolic link on the wordpress side? Would my codeigniter settings be loaded? I have a feeling this will not work.
  4. iFrame – This is a module being included, so it lacks all the styles and headers and whatnot
  5. .htaccess file – this is a long shot, but if there was some way to get the .htaccess file to redirect the call to the other server without ajax knowing, it might work?

At this point, I’m leaning to #2 because that’s the only working solution. Are there any other solutions that you guys could think of? If there was some way to pass data along with the jsonp, that would be ideal, but all sites say it’s impossible to pass post data, and codeigniter doesn’t like query strings… actually, I could enable it, but that would probably screw everything up at this point.

UPDATE

So I followed the first posters idea, and it worked. I found a similar solution at
jQuery $.ajax(), $.post sending "OPTIONS" as REQUEST_METHOD in Firefox
What worries me now is that they are say that there are some cross browser issues. Any thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T02:45:06+00:00Added an answer on May 19, 2026 at 2:45 am

    Would setting the HTTP header “Access-Control-Allow-Origin” in codeigniter site solve your problem?
    Something like this in your apache site configuration file could do the trick:

        <Directory "/usr/lib/php-lib">
                Order allow,deny
                Allow from all
                Header set Access-Control-Allow-Origin "*"
        </Directory>
    
        #Instead of "*" you could restrict it to "www.mysite.com"
    

    Or you could set this header inside an .htaccess file inside your page directory

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've found a couple similar posts regarding this same problem, but none of the
I found a couple questions similar to this, but not specifically for .NET projects,
I have browsed StackOverflow and found a couple questions/answers that are close but not
I found a couple of threads that touch on development of C#/Java apps but
Found a couple of similar questions here on this, but couldn't figure out how
Found a couple of similar questions here on this, but couldn't figure out how
I've found a couple online services that do this, and I found this post
I've found a couple of posts suggesting proprietary solutions that do what I'm looking
I've found a couple of references ( for example ) that suggest using final
I found these questions, but a couple of them were a little old: https://stackoverflow.com/questions/191556/should-i-pursue-asp-net-webforms-or-asp-net-mvc

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.