Good day to all!

Help me to understand. There is a site on joomla 1.5.22, virtuemart (an electronic store component) is installed on the site, programmers who created the store could not implement a normal filter by the manufacturer of the product, therefore several links were created (in joomla this type of link is called "External link") something like this /component/virtuemart/?page=shop.browse&manufacturer_id=9 , so now the directory has changed and you need to redirect from these links (such as external) to regular links to the virtuemart category, something like this: /component/virtuemart/25- .

I tried to solve the problem using the joomSEF component, there is a redirects manager in it, I registered there an old link and a new one (where I need to redirect), i.e. ( /component/virtuemart/?page=shop.browse&manufacturer_id=9 and /component/virtuemart/25- respectively) - does not work, tried using .htaccess in this way: Redirect 301 /component/virtuemart/?page=shop.browse&manufacturer_id=9 /component/virtuemart/25- , also does not work, then tried to prescribe such a construction in the same .htaccess

 Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^http://kover.mnogomesta.ru/component/virtuemart/?page=shop.browse&manufacturer_id=9 RewriteRule (.*) http://kover.mnogomesta.ru/component/virtuemart/25-/$1 [R=301,L] 

and also nothing comes out, the site opens successfully via the link /component/virtuemart/?page=shop.browse&manufacturer_id=9 and no redirects occur.

Tell me, what can I do? PS Redirect 301 /page1.html http://kover.mnogomesta.ru/page2.html on the site checked Redirect 301 /page1.html http://kover.mnogomesta.ru/page2.html - everything works, does not plow, only when you try to refer from an external link.

Thank you in advance!

    1 answer 1

    Oh, what can I say. Read more about RewriteRule. In short, HTTP_HOST is the host (kover.mnogomesta.ru) and it cannot contain http://kover.mnogomesta.ru/component/virtuemart/?page=shop.browse&manufacturer_id=9 .

    If you are only for SEO - these links should be removed (so that Joomla did not eat them), and in .htaccess register something like that

     RewriteEngine on RewriteCond %{REQUEST_URI} ^.*manufacturer_id=.*$ RewriteRule ^.*manufacturer_id=(\d+).*$ /component/virtuemart/25-/$1 [R=301,L] 

    PS: on j1.5 + vmart sooo costly to make a normal filter anything.

    • Thanks for the advice, but it did not help all the same, the virtuemart component in particular, the file that is responsible for the formation of the product page simply reads the parameters from the $ _GET array, processes them and returns the result. I deleted links from the Joomla menu, but she still “eats them” and does not want to redirect. = ( - maler1988
    • You play with regulars in .htaccess, I could easily do it) I corrected a little, we can do that - Sh4dow