fkdoier Posted May 18, 2013 Share Posted May 18, 2013 Hello. I am trying to redirect ajax request from site.com/clientarea.php?action=productdetails&modop=custom&id=14 to billing.site.com/clientarea.php?action=productdetails&modop=custom&id=14 on site.com i use whmcs-bridge so user already logged in. when js script execute this request he's got whmcs login page as response. i use apache mod_rewrite and mod_proxy to process this request, in .htaccess on site.com RewriteEngine On RewriteCond %{REQUEST_URI} clientarea.php(.*)$ RewriteRule ^(.*)$ http://billing.site.com/clientarea.php%1 [P,L] is any idea how to do this task correct? 0 Quote Link to comment Share on other sites More sharing options...
And then there was one les Posted May 18, 2013 Share Posted May 18, 2013 Be more specific and you should only need the rewrite and not the condition. So long as there is no dynamic RewriteEngine On RewriteRule ^clientarea.php?action=productdetails&modop=custom&id=([0-9]+)$ http://billing.site.com/clientarea.php?action=productdetails&modop=custom&id=$1 [P,L] You might not need the proxy flag as the sub domain should be on the same server as the TLD. so you can try removing that. 0 Quote Link to comment Share on other sites More sharing options...
fkdoier Posted May 18, 2013 Author Share Posted May 18, 2013 Be more specific and you should only need the rewrite and not the condition. So long as there is no dynamic RewriteEngine On RewriteRule ^clientarea.php?action=productdetails&modop=custom&id=([0-9]+)$ http://billing.site.com/clientarea.php?action=productdetails&modop=custom&id=$1 [P,L] You might not need the proxy flag as the sub domain should be on the same server as the TLD. so you can try removing that. I need use P flag because the js script not processing http redirect. If i use http redirect in rewrite rule this request works fine into browser, but not in ajax script. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.