I've hit a real dead end here and would appreciate advice. I have a large series of files that have moved from:
/content/yyyy/mm/dd/title.php to:
/newdir/yyyy/mm/title.php
I need to redirect all traffic from the old location to the new location. Because I can't get rid of the dd, I'm using this rule temporarily:
Code:
RewriteCond %{REQUEST_URI} ^/content/
RewriteRule ^content/(.*)$ /newdir/$1 [R=301,L]
Any ideas on how I remove the /dd/ portion of the URL or is this impossible?
Thanks! After 2 hours of messing around, I'm losing my mind.
--------------- Added [DATE]1202235516[/DATE] at [TIME]1202235516[/TIME] ---------------
The solution:
Code:
RewriteRule ^content/([^/]+)/([^/]+)/[^/]+/([^/]+\.php) http://www.domain.com/newdir/$1/$2/$3 [L,R=301]