[clug-talk] Apache and mod_rewrite tips?

Shawn sgrover at open2space.com
Mon Mar 14 21:30:30 PST 2005

Thanks for the response Dave.

What you say kinda makes sense, except I've seen reference to using 
mod_rewrite like this.  It could be that I was misreading the pages I found, 
but I understood that ProxyPass/ProxyPassReverse only affected the HTTP 
headers, whereas mod_rewrite could be used to modify the contents of a page.

I did find a page referring to mod_proxy_html (not mod_proxy_http) that 
suggested the module was nothing more than a wrapper for the appropriate 
rewrite statements.

So, I guess my question is how do you do this then, if mod_rewrite isn't the 
correct option?  I do have the ability to change the server and directory for 
the entire application (we built it to be portable - er, be able to move to a 
new server relatively easily), but there are some application server specific 
issues that come into play here.  (CFMX 6.1 server, and the app uses a CFC 
directory located under the server root, but not under the application root).  
This could be a major thing to change our application structure - something 
we simply wouldn't do for the sake of a proxy server.  It'd be much 
easier/cheaper just to redirect port 80 directly at the IIS server and let it 
handle the other vhosts we need.

hmmm... a thought occured to me while I was typing up that last paragraph...  
could the problem simply be that I have a circular IP reference??  The Apache 
server has a HOSTS entry pointing myapp.myorg.com to the internal IP of the 
IIS server (say  The IIS server knows that myapp.myorg.com 
points to the apache server (via internal DNS).  So if I change the server 
name for the application to by myapp.myorg.com, then the internal server 
points to the apache server which  points to the internal server, which.... 
etc.  If I were to simply add a hosts entry on the IIS server pointing 
myapp.myorg.com to, would that take care of the problem??  If so, 
then I shouldn't need mod_rewrite at all, and ProxyPass should do the 

Thanks again for the feedback.  My apollogies for thinking out loud.. so to 


On Monday 14 March 2005 21:13, Dave Lee wrote:
> Shawn <sgrover at open2space.com> wrote:
> > Thus far, I've yet to see an anchor tag's HREF change.
> mod_rewrite doesn't rewrite urls in html, it only rewrites request
> urls that make it to the server.  that is, if the html isn't pointing
> to the right server, and you can't change the dns, mod_rewrite can't
> solve the problem.
> Dave

More information about the clug-talk mailing list