Jump to content

Redirect clientarea.php request.


fkdoier

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated