I'm trying to redirect all existing urls to a new slightly simplified url structure, and wish to keep the existing links that have been indexed on google/bing intact.
The current url for posts looks like this /blog/post/some-random-post-here the new post url's are virtually the same but no longer have /post/ in them. Instead its /blog/some-random-post-here
I have created a new htaccess rule for the new urls. So as of now both versions of the url's work. However I wish to keep one copy for SEO reasons. This is on a blog made from scratch (this is not WordPress or other blogging softwares)
Here are the rewrite rules in my htaccess for old and new urls.
**OLD URL:** RewriteRule ^post/([^/]+)/$ index.php?controller=post&action=view&post=$1 [L]
------------------------------------------------------------------------
**NEW URL:** RewriteRule ^([^/]+)/$ index.php?controller=post&action=view&post=$1 [L]
What would I need to add to the OLD URL structure in order to make a 301 permanent redirect to the new url structure? Both the OLD and the NEW rewrite rules are still active. But I rather 301 the old rule to the new URL.
Thank you in advance.