Apache: Writing and debugging RewriteRules
Fabian Blechschmidt
Yesterday I had to improve RewriteRules. We redirected the old Magento 1 /catalogsearch/
search urls to the homepage. Yesterday the penny dropped and we decided to redirect it to the Shopware search ?
How to do this you asked?
RewriteCond %{QUERY_STRING} q=(.+)
RewriteRule ^catalogsearch /search?search=%1 [L,R=301]
But more important to me is, how to implement this. Stackoverflow helps, the documentation from Apache HTTP Server Project but putting everything together in my own .htaccess
or better VHost config I used
https://htaccess.madewithlove.com
They have other great tools, but unfortunately there seems to be no list?
But I can recommend https://semver.madewithlove.com as well, if you have problems with your expected composer packages!
Other articles from this category