Path

ez.no / exponential / documentation / installation / virtual host setup / excluding other parts of your website.


Excluding other parts of your website.

If you need to have some parts of your website run outside Exponential, then these rewrite rules will cause a problem. The reason for this is that they direct everything to go through Exponential, so even if you have an Alias defined for another directory you won't be able to see it (and Exponential will give you an error about an unknown module).

The trick here is to add a Rewrite condition in front of the rule, so that the rule isn't processed for certain things.

For example, let's say you have some separate forum software and a contact database which need to run outside of Exponential. Exponential is installed in the DocumentRoot, the forum lives at http://example.com/forum and the contacts database is at http://example.com/contacts. In your virtual server config you set up aliases to their directories, then add these lines in front of the RewriteRule:




       RewriteCond %{REQUEST_URI}     !^/forum.*


       RewriteCond %{REQUEST_URI}     !^/contacts.*




This means that the RewriteRule directive will only be processed if the requested url is not the forum or the contacts db. Anything else will go through Exponential.

I hope this saves somebody else from having to read through the Apache docs on mod_rewrite, but if you need them you can find them here: (for Apache 2)
http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html
http://httpd.apache.org/docs-2.0/misc/rewriteguide.html