htaccess one-liner for MT URL restructuring

/ Published in: XML
Save to your folder(s)

Build URLs for subcategories, e.g. 'cat-child-support.html' becomes '/family-law/child-support/'

Copy this code and paste it in your HTML
  1. <MTHasParentCategory>
  2. RewriteRule ^cat-<$MTCategoryLabel dirifyplus="pld"$>.html$ <MTParentCategories glue="/"><$MTCategoryLabel dirifyplus="pld"$></MTParentCategories> [R=301,NC,L]
  3. </MTHasParentCategory>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.