I read all availabe Q&A but i still did not found any solution.
I am running a Online store using wordpress.. now i move to opencart because of Payment Gateway option. but i have 301 URL redirect Problem..
http://website.com/2011/01/my-product-name/
to
http://website.com/my-product-name.html
My htaccess code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#### Rewrite Code ####
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]
Redirect 301 ^/2011/01/my-product-name/$ http://website.com/my-product-name.html
After when i try to redirect its redirect to
http://website.com/my-product-name.html/?_route_=2011/01/my-product-name/
I don't know why its add ?route= inurl and all other other link?
is there any solution available?
If you want a redirect rule for all of your 2011 products like that, you could use
RewriteRule ^/2011/\d{2}/([^/]+)/$ index.php?_route_=$1 [L,QSA]
Assuming that
Of course, if some are articles, you could in fact rewrite to information pages with the same content as the old Wordpress posts using the same method as you have for products by giving them the correct url alias