LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   how to divert one url to another server in apache (https://www.linuxquestions.org/questions/linux-server-73/how-to-divert-one-url-to-another-server-in-apache-913814/)

sanjay87 11-16-2011 05:55 AM

how to divert one url to another server in apache
 
I Had installed apache in two different server machine..


http://example.divert.com server1 : /tomcat/apache-tomcat/webapps/ROOT/divert

http://example.accept.com server2 : /tomcat/apche-tomcat/webapps/Root/accept/index.jsp

i want when the url hits /divert in server1 /tomcat/apache-tomcat/webapps/ROOT/divert .... it should divert to /tomcat/apche-tomcat/webapps/Root/accept/index.jsp of server2 ..


vi /etc/hosts
10.200.1.44 divert.com divert.com
10.200.1.39 accept.com accept.com

vi /etc/httpd/conf/httpd.conf
RewriteEngine on
RewriteLog /etc/httpd/logs/rewrite.log
RewriteLogLevel 9
RewriteRule /b2c http://worldland.net?type=b2c [R,L]

its diverting to
http://worldland.net/?type=b2c
im getting as http://worldland.net/?type=b2c
i dont want / net and ? how can i solve the prob rewrite
can anyone help me in these problem
thanks
sanjay

pantdk 11-17-2011 11:34 PM

Hi

try these links to resolve your prob



All times are GMT -5. The time now is 12:29 AM.