apache rewrite help
I'm trying to proxy a server and change the appearance of the server directories for client browsers.
On the proxy server ("proxy"), I've added the following: Code:
ReWriteEngine On I've also had to write additional rules for subdirectories, which tells me I'm probably doing something wrong: Code:
RewriteRule ^/dir/ect/ory/subdir$ http://server/directory/subdir [R] Code:
ProxyPass /directory http://server/directory |
I think a very simple pair of ProxyPass|ProxyPassReverse directives could replace some of this stuff, but not all... what about this on the proxy server:
Code:
ProxyPass /dir/ect/ory http://server/directory The problem is the subdirs: I'm doing this because I need to mirror TWiki pages (which are not .HTML files) with their HTML counterparts. The TWiki treats URL space a bit differently (their "webs" and "topics" appear as directories without a trailing slash in the URL). So when you browse to a specific page of the TWiki, you don't append .html to the URL because it doesn't exist. However, it's there on the HTML mirror, and I need something to not ony append the .html suffix to each incoming request, but to be able to tell whether the request is looking for a file or a directory. The RewriteRule above works for that, if I duplicate it so it appears with and without the trailing slash, and for each subdirectory (I'm sure there's a better way... I can't figure out the syntax to condense it all). But that doesn't help with the URL space issue that ProxyPass seems to help with. |
Folks, any ideas on how to get this working, or to improve the methods I've tried? I'd really appreciate your help.
|
OK... can anyone help me figure out how to clean this up on the proxy's httpd.conf?
Code:
<VirtualHost *:80> Thanks. |
All times are GMT -5. The time now is 05:26 AM. |