File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

AJAX Apache redirect doesn't work

s Joshi
Greenhorn

Joined: Sep 26, 2005
Posts: 12
Hello,

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

If I visit http://abc.domain.com/xyz/proxy.jsp using a browser, then it gets redirected to http://xyz.mydomain.com/proxy.jsp but my AJAX calls are not being made.

Any ideas?

Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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
http://abc.domain.com/test.html

you would have to call a proxy in the same location
http://abc.domain.com/proxy

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

Eric
s Joshi
Greenhorn

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 http://xyz.mydomain.com/proxy.jsp using Apache Redirect. This redirect never takes place from AJAX call.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AJAX Apache redirect doesn't work
 
Similar Threads
using mod_redirect and retaining full URL
Calling HTML Page from Servlets
RMI on a Servlet
i have started my last week preparations please help
IBM Http Server : Unable to redirect to custom error page