Username Password
Bookmark and Share

URL Masking

This is a bit more about Apache than WebGUI, but it is a useful topic any user of Apache. Masking URL's can save some work and are especially useful if you just need to show a single page under a separate domain. Say, for instance, you want to have the content from display the content located at

Masking URL's require mod_rewrite and mod_proxy [P]. Mod_rewrite is already enabled in the modproxy server for your site. It's easiest to copy the current virtual host in your modproxy config file and create an additional virtual host the same file. Edit /data/wre/etc/ and add the following rules, making sure you have RewriteEngine on in your copied virtual host.  

        # mask real url
        RewriteCond %{REQUEST_URI} ^/css
        RewriteRule ^(.*)$$1 [P,L]

        RewriteCond %{REQUEST_URI} ^/media
        RewriteRule ^(.*)$$1 [P,L]

        RewriteCond %{REQUEST_URI} ^/uploads
        RewriteRule ^(.*)$$1 [P,L]

        RewriteRule ^(.*)$ [P,L]

Then restart the proxy server:

/data/wre/sbin/rc.apache restartmodproxy 

Keywords: message

Search | Most Popular | Recent Changes | Wiki Home
© 2023 Plain Black Corporation | All Rights Reserved