Przekierowanie podstrony X na podstronę Y w .htaccess

0

Potrzebuję przekierować (nie przepisać) stronę "?q=kontakt" do "kontakt.html" Utworzyłem

RewriteEngine on
#RewriteBase /

Redirect 301 /?q=kontakt /kontakt.html

Adres nie jest przekierowany. Gdzie popełniam błąd?

2

Do poczytania - https://www.internetmarketingninjas.com/blog/search-engine-optimization/301-redirects/

Pod koniec w/w artykułu jest ciekawy fragment:
Lastly, note that stacking up 301s over time is not a great strategy for website health. 301s are very useful, but you’ll want to update your site’s internal links to the correct URLs. Ignoring your old intra-site links in favor of simply using 301 after 301 after 301 only slows down your webpage load time, which is bad enough for SEO. And if the redirects are stacked deep enough, search crawlers may not follow them all. If that happens, it’ll damage your site’s ability to stay in the search index. Also, when you are updating your site links, you should also ensure your sitemap.xml file is updated with the newest URLs.

1

Dziękuję za pomoc

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{QUERY_STRING} q=kontakt
    RewriteRule (.*) /kontakt.html? [L,R=301]
</IfModule>

1 użytkowników online, w tym zalogowanych: 0, gości: 1