tags:

views:

28

answers:

1

Hi, I currently have a site setup with the following in httpd.conf:

<VirtualHost x.x.x.x:80>
 ServerName testsite
 ExpiresActive On
 ExpiresByType image/gif A2592000
 ExpiresByType image/png A2592000
 ExpiresByType image/jpg A2592000
 ExpiresByType image/jpeg A2592000
 ExpiresByType text/css A2592000
 ExpiresByType application/x-javascript A1
 ExpiresByType text/javascript A1
 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript

 DocumentRoot /usr/local/www/apache22/data/thesite/trunk

 RewriteEngine On
 RewriteRule !\.(htc|js|tiff|gif|css|jpg|png|swf|ico|jar|html|doc|pdf|htm|xml)$ %{DOCUMENT_ROOT}/../platform.php [L]
</VirtualHost>

Where x.x.x.x is my IP.

At the moment it forwards anything which is not in the set (htc|js|tiff|gif|css|jpg|png|swf|ico|jar|html|doc|pdf|htm|xml) to platform.php

How htp://x.x.x.x/phpmyadmin to also forward. Would it be possible to only perform this rewrite conidtion if I am in a subdirectory. Eg. http://x.x.x.x/projectone So htp://x.x.x.x/projectone/login would direct to the platform.php

Thanks

A: 

Try this rule:

RewriteCond %{REQUEST_URI} !\.(htc|js|tiff|gif|css|jpg|png|swf|ico|jar|html|doc|pdf|htm|xml)$
RewriteRule ^projectone(/|$) %{DOCUMENT_ROOT}/platform.php [L]
Gumbo