Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mod_rewrite/mod_proxy and apache

Status
Not open for further replies.

DDreams

MIS
Sep 6, 2005
2
US
Hi all.I have a Solaris machine running Apache 1.3.14 with mod_proxy, mod_rewrite, and mod_ssl compiled.Each piece is working well (though if anyone can tell me how to proxy https I'd sure appreciate it).

My main question has to do with mod_rewrite.What this apache installation is trying to do is serve as a proxy which will take the URL the user entered and append it to a base URL (actually a servlet on a different machine which takes a URL as it's argument).To that end I have the following sections in httpd.conf:


<IfModule mod_proxy.c>
ProxyRequests On
<Directory proxy:*>
Order deny,allow
Deny from all
Allow from 10.100.
</Directory>
ProxyVia On
ProxyPass / </IfModule>


##
## rewriting code
##
RewriteEngine on
RewriteLog /path/to/proxy_server/apache/logs/rewrite_log
RewriteLogLevel 1

# Don't rewrite local URLs
RewriteCond %{HTTP_HOST}!^proxy\.box\.com

# Only rewrite proxy requests
RewriteRule ^proxy:(.+)

# Rewrite as servlet URL plus url as arg
RewriteRule ^proxy:(.+)\ [R]


(Sorry for the weird formatting, the message box is smaller then the resulting post which makes for wacky formatting)

-------------------


This works fine and accomplishes most of what I want.... However:this solution leaves a very long URL in the users browser, such as:


What I want to do is display &quot; in the browser, even though the page has been filtered through our box...
Is this possible??

How?

Much appreciated! I've been struggling with this for a couple days now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top