Page 1 of 1
[Solved] Redirect To Different Server
Posted: Thu Sep 15, 2005 5:02 pm
by nickvd
I need to rewrite urls based on the initial dirctory that is called to a different server on a different system, details below:
I have developed a site for a client who has their own in-house trouble ticket system created in asp.net and hosted on (duh... an IIS server) The site i created (mysql/php) is hosted on a linux server (lamp) (both servers are located in-house and i have root on both). The situation is as follows:
I need any url that comes in like this:
http://www.somesite.com/wm/<rest of url> to be shuffled off to
http://www.somesite.com:81/wm/<rest of url> -=or=-
http://10.1.1.1/wm/<rest of url> which ever would be best
I tried the simple:
Code: Select all
RewriteEngine on
RewriteRule ^wm/(.*) http://somesite.com:81/wm/$1
but it fails to send everything over with it (just the filename gets sent. Can anyone help with this matter? I would really appreciate it!
Thanks,
Nick
Posted: Thu Sep 15, 2005 7:47 pm
by Buddha443556
Would this be a POST request? I think, it's a security violation to redirect POSTs which might explain what's happening. Might try
mod_proxy if that's the case?
Posted: Fri Sep 16, 2005 1:14 pm
by nickvd
Well, the initial request for
http://www.site.com/wm/ wont be post, but the application housed on the IIS server (which is where /wm/ will be redirecting to) will almost certainly have post/get calls (i've never seen the application, so i cant say for certain... I'll be on-site at my clients today trying to set it up, and will report back any problems...
any idea of how mod_proxy works? i can look it up (and i will) but i have a severe lack of time at the moment preparing for this meeting.
Posted: Fri Sep 16, 2005 5:10 pm
by Buddha443556
nickvd wrote:Well, the initial request for
http://www.site.com/wm/ wont be post, but the application housed on the IIS server (which is where /wm/ will be redirecting to) will almost certainly have post/get calls (i've never seen the application, so i cant say for certain... I'll be on-site at my clients today trying to set it up, and will report back any problems...
any idea of how mod_proxy works? i can look it up (and i will) but i have a severe lack of time at the moment preparing for this meeting.
Nothing beyond the manual. Pay close attention to security don't want leave an open proxy.
Good luck.
Posted: Fri Sep 16, 2005 5:21 pm
by nickvd
I've successfully implemented the mod_proxy method. it's a reverse proxy leading to a internal ip address ^wm/?(.*) ->
http://10.32.40.3/$1
I don't see any security problems, since it's only serving requests from that specific uri, to an internal web server. Am I correct in assuming this?
Posted: Fri Sep 16, 2005 5:40 pm
by Buddha443556
nickvd wrote:I've successfully implemented the mod_proxy method. it's a reverse proxy leading to a internal ip address ^wm/?(.*) ->
http://10.32.40.3/$1
I don't see any security problems, since it's only serving requests from that specific uri, to an internal web server. Am I correct in assuming this?
That sounds good to me. Reverse proxy aren't a problem. Glade you got it working.
Posted: Fri Sep 16, 2005 6:54 pm
by nickvd
Awesome, Thanks for the Assistance!