PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Wed Sep 18, 2019 3:08 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: .htaccess regex help
PostPosted: Wed Nov 03, 2010 1:56 pm 
Offline
Forum Newbie

Joined: Wed Nov 03, 2010 1:54 pm
Posts: 1
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]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group