Forum Moderators: phranque

Message Too Old, No Replies

Forward real IP address when using URLRewriting.

         

nixon

3:12 pm on Aug 10, 2005 (gmt 0)

10+ Year Member



Hi there! Im stuck!
I uses Apache 1.3 and the URL Rewriting module to make my links a bit more user friendly and also hide the actual application server, apache tomcat.

My problem is that URL's that have been rewrited by the HTTP server doesn't keep its orignal IP address, it gets the IP address of the HTTP server. Do you have any idea how I don't "loose" the orignal IP address.

Below is a snippet of my Rewriting from the httpd.conf file.
The Rewriting rules isnt in a <Virtualhost> tag.

RewriteEngine On
RewriteLog logs/rewrite.log
RewriteLogLevel 2

RewriteRule ^/$ index.htm [P]
RewriteRule ^/(dvd)/(.*)-([0-9]*)\.htm category.jsp?path=$2&page=$3&filter=$1 [P]

Best regards Nixon

jdMorgan

4:13 pm on Aug 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nixon,

Welcome to WebmasterWorld!

If you mean that your back-end server is seeing the front-end proxy's IP address, then yse, this is to be expected. Tomcat should examine the HTTP Forwarded-For header to get the original requestor's IP address.

Jim