# Site configuration file
# Sets forwarding from Apache to PLT Web Server
# This file is autogenerated

# Params:
#  - server-root  : String The root URL of the PLT web server.  Ends in a / (e.g. http://localhost:8765/)
#  - servlet-path : String A path from server-root to the servlet (e.g. servlets/main.ss)
#  - forward-root : String The root URL that should be forwarded to the PLT Web Server.  An exact match will be forwarded to the servlet, anything else under forward-root will be forwarded as it to the server 

<VirtualHost *>
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy> 

    RewriteLog "/var/log/apache2/rewrite.log"
    RewriteLogLevel 0

    RewriteEngine On
    RewriteRule ^<<forward-root>>$ <<(string-append server-root servlet-path)>> [P]
    RewriteRule ^<<forward-root>>(.+) <<server-root>>$1 [P]
</VirtualHost>
