Monday, April 30, 2012

.htaccess if directive

in .htaccess I have something like this:



RewriteCond %{REQUEST_URI} (\/out\/pictures\/)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (\.jpg|\.gif|\.png)$ core/utils/getimg.php


I want to change it to



RewriteCond %{REQUEST_URI} (\/out\/pictures\/)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
if url == www.mysite.com {
RewriteRule (\.jpg|\.gif|\.png)$ core/utils/getimg.php
} else {
RewriteRule (\.jpg|\.gif|\.png)$ core/utils/getimg1.php
}


Is it possible in some way?





No comments:

Post a Comment