Meaningless Drivel is fun!
The moose likes HTML, CSS and JavaScript and the fly likes AJAX Apache redirect doesn't work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "AJAX Apache redirect doesn Watch "AJAX Apache redirect doesn New topic

AJAX Apache redirect doesn't work

s Joshi

Joined: Sep 26, 2005
Posts: 12

I have an HTML page which uses AJAX and its deployed on Apache server without tomcat module (e.g. I am making an AJAX call to /xyz/proxy.jsp from this html page and it gets permanent redirected to (using Redirect in Apache configuration).

If I visit using a browser, then it gets redirected to but my AJAX calls are not being made.

Any ideas?

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
First off if you put a simple text file on your server in the same directory does you code fetch it.

Next JavaScript has a same domain policy where the script can only worth with other info in the calling domain. Think it has issues with sub domains.

if you page is here

you would have to call a proxy in the same location

That proxy would have to go and get another page from an outside source.

s Joshi

Joined: Sep 26, 2005
Posts: 12
Thanks for answering.

My proxy is on other machine.

My Apache server is not capable of handling JSP/PHP requests (restriction). My AJAX procedure makes call to "/xyz/proxy.jsp", which gets redirected to using Apache Redirect. This redirect never takes place from AJAX call.
I agree. Here's the link:
subject: AJAX Apache redirect doesn't work
jQuery in Action, 3rd edition