Hello, I transfer the site from Joomla to another engine and there was a problem with the URL. I haven’t transferred the new version of the site yet and on a temporary hosting I test its 301 redirect. All this is done in order to then overtake the weight of our pages to new ones with new URLs. The problem is that using the following entry:

Redirect 301 /index.php?option=com_joomap&Itemid=18 http://site.ru/map.html

redirects me to the main page and the URL remains the "tail" of parameters i.e. like this:

http://site.ru/about.html?option=com_joomap&Itemid=18

Is there a way to fix this? I would be grateful for any help.

    1 answer 1

    I used this construct for each page RewriteCond% {QUERY_STRING} ^ option = com_joomap & Itemid = 18 RewriteRule ^ index.php $ http://site.ru/map.html [L, R = 301]

    And then after all the redirects I used the following entry: RewriteCond% {THE_REQUEST} ^ [AZ] {3.9} \ / ([^?] ) \? RewriteRule (. ) / $ 1? [R = 301, L]

    It removes ALL the additional parameters in the URL on all pages of the site. In my case it helped, but if you have pages that have parameters in the URL, THIS WILL NOT HELP YOU!