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. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |