RewriteEngine on

RewriteCond %{HTTP_HOST} [.?]?cdn\.produits\.batiactu\.com [NC,OR]
RewriteCond %{HTTP_HOST} [.?]?cdn\.produits\.maisonapart\.com  [NC]
RewriteCond %{REQUEST_URI} !index.php [NC]
RewriteCond %{REQUEST_URI} ^/img/ [NC]
RewriteCond %{REQUEST_URI} /(.*)-c/ [NC]
RewriteCond %{QUERY_STRING} ^(.?)REFRESH(.?)$ [NC,OR]
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d   
RewriteRule ^(.*) /img/edito_auto/index.php [L]

RewriteCond %{HTTP_HOST} [.?]?dev8\.batiactu\.com [NC]
RewriteCond %{REQUEST_URI} /(.*)-c/ [NC]
RewriteCond %{REQUEST_URI} !index.php [NC]
RewriteCond %{QUERY_STRING} ^(.?)REFRESH(.?)$ [NC,OR]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /cap_centredoc/images/edito_auto/index.php [L]

RewriteCond %{REQUEST_URI} !index.php [NC]
RewriteCond %{REQUEST_URI} /(.*)-c/ [NC]
RewriteCond %{REQUEST_URI} REFRESH [OR]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /cap_centredoc/images/edito_auto/index.php [L]


RewriteCond %{HTTP_HOST} [.?]?cdn\.produits\.batiactu\.com [NC,OR]
RewriteCond %{HTTP_HOST} [.?]?cdn\.produits\.maisonapart\.com  [NC]
RewriteCond %{REQUEST_URI} !index2.php [NC]
RewriteCond %{REQUEST_URI} ^/img/ [NC]
RewriteCond %{REQUEST_URI} /(.*)-rc/ [NC]
RewriteCond %{QUERY_STRING} ^(.?)REFRESH(.?)$ [NC,OR]
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d   
RewriteRule ^(.*) /img/edito_auto/index2.php [L]

RewriteCond %{HTTP_HOST} [.?]?dev8\.batiactu\.com [NC]
RewriteCond %{REQUEST_URI} !index2.php [NC]
RewriteCond %{REQUEST_URI} /(.*)-rc/ [NC]
RewriteCond %{QUERY_STRING} ^(.?)REFRESH(.?)$ [NC,OR]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /cap_centredoc/images/edito_auto/index2.php [L]

RewriteCond %{REQUEST_URI} !index2.php [NC]
RewriteCond %{REQUEST_URI} /(.*)-rc/ [NC]
RewriteCond %{REQUEST_URI} REFRESH [OR]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /cap_centredoc/images/edito_auto/index2.php [L]