.htaccess regex help
Posted: Wed Nov 03, 2010 1:56 pm
I need to redirect the top url pattern to the bottom one for drupal:
original-> http://www.mydomain.com/store//images/P/VC0842_big.jpg
new-> http://dev.mydomain.com/sites/default/f ... 42_big.jpg
I tried this to no avail.
RewriteEngine on
RewriteCond %{HTTP_HOST}^.*/store//images/P/(.*)$ [NC]
RewriteRule ^.*/store//images/P/(.*)$ http://dev.mydomain.com/sites/default/f ... oduct/P/$1 [L,R=301]
anyone good with regex please help.
thanks in advance
UPDATE: this seems to work:)
RewriteBase /
RewriteRule ^(.*)store\/+images\/P\/(.*)$ sites/default/files/images/imagecache/product/P/$2 [L,R=301]
original-> http://www.mydomain.com/store//images/P/VC0842_big.jpg
new-> http://dev.mydomain.com/sites/default/f ... 42_big.jpg
I tried this to no avail.
RewriteEngine on
RewriteCond %{HTTP_HOST}^.*/store//images/P/(.*)$ [NC]
RewriteRule ^.*/store//images/P/(.*)$ http://dev.mydomain.com/sites/default/f ... oduct/P/$1 [L,R=301]
anyone good with regex please help.
thanks in advance
UPDATE: this seems to work:)
RewriteBase /
RewriteRule ^(.*)store\/+images\/P\/(.*)$ sites/default/files/images/imagecache/product/P/$2 [L,R=301]