0

I recently redid an ExpressionEngine site that was not using template routes for a blog, so the blog URLs were like this: http://mywebsite/blog/detail/url-title-here

After the redesign, I created a template route and removed the 'detail' segment changing the URLs like this: http://mywebsite/blog/url-title-here

Both URLs are now accessible though, so I want to redirect all of the old URLs to the new ones without 'detail' in the URL.

How can I achieve this? Thanks.

1 Answer 1

2

I actually just figured it out with an htaccess RewriteRule.

RewriteRule ^blog/detail(.*)$ /blog$1 [NC,R=301,L]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.