Rewrite Rule & Proxy help

This is a discussion on Rewrite Rule & Proxy help within the Apache Web Server forums, part of the Web Server and Related Forums category; I've got two servers ... The first www.domain.com is hosted by an apache server. It handles static content. ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-26-2006
djschroeder
 
Posts: n/a
Default Rewrite Rule & Proxy help

I've got two servers ... The first www.domain.com is hosted by an
apache server. It handles static content. The second, secure.domain.com
is hosted on a different server (using port 8080) and handles dynamic
client stuff.

What'd I'd like to do is the following:

Any files ending in .html would be served by the apache server. But,
when a link is clicked like "www.domain.com/login.a4d", I'd like user
to see the page served from the second server who's "real" url would be
"secure.domain.com/login.a4d". The user, of course doesn't see
"secure", though. They would still see "www".

Would RewriteRules accomplish this? I've tried things like this below,
but can't seem to get it.

Options +FollowSymlinks
RewriteEngine On
RewriteRule ^/(.*\.a4[d|p])$ http://secure.domain.com:8080/$1 [P,L]

Actually, when I use the rule above it does work if I don't include the
[P], but then the user sees the url that it's being rewritten to,
"http://secure.domain.com/login.a4d" instead of
"http://www.domain.com/login.a4d".

Does this mean that my hosting provider doesn't have the proxy module
enabled?

Thanks,

Darin

  #2 (permalink)  
Old 03-26-2006
Robert Ionescu
 
Posts: n/a
Default Re: Rewrite Rule & Proxy help

djschroeder wrote:
> Does this mean that my hosting provider doesn't have the proxy module
> enabled?


I think yes. But you should be some error if you use the P-Flag, at
least on some versions of apache respond with a 403 forbidden, the newer
ones will create an error.log entry, too, I think.
You might check the RewriteLog, if you can enable it (only in server
conntext).

--
Robert
  #3 (permalink)  
Old 03-26-2006
djschroeder
 
Posts: n/a
Default Re: Rewrite Rule & Proxy help

Thanks for the fast reply ...

I think my hosting provider doesn't do it. I tried a simple proxypass
and it failed as well.

Now to find a new host...

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:35 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0