If we need to redirect more different URLs by query address to an unique address, or we need special rules, below, we are showing tips that can be used, with explanation.
<?php
#URL, that match is http(s)://domain.ext/?kontakt(y) - redirect to http(s)://domain.ext/kontakt/
RewriteCond %{QUERY_STRING} ^kontakt$ [OR]
RewriteCond %{QUERY_STRING} ^kontakty$
RewriteRule ^ /kontakt/ [L,R=301]
#Redirecting from http(s)://domain.ext/?sidlo to http(s)://domain.ext/kontakt/#sidlo
RewriteCond %{QUERY_STRING} ^sidlo$
RewriteRule ^ /kontakt/#sidlo [NE,L,R=301]
#Redirecting from http(s)://domain.ext/kontakt/bratislava?pobocka to
#http(s)://domain.ext/kontakt/#bratislava pomocou 302 presmerovania (docasne)
RewriteCond %{QUERY_STRING} ^pobocka$
RewriteRule ^kontakt/bratislava /kontakt/#bratislava [L,R=302]
#Redirecting from http(s)://domain.ext/kontakt/sidlo to http(s)://domain.ext/kontakt/
RewriteRule ^kontakt/sidlo /kontakt/ [L,R=301]
#Redirecting everything that begins with http(s)://domain.ext/cz/kontakt/ and redirecting to #http(s)://domain.ext/kontakt/cz/ - after last slash, remaining URL part will be attached
RewriteCond %{QUERY_STRING} ^extra$
RewriteRule ^cz/kontakt/(.*)$ /kontakt/cz/$1 [NE,L,R=301]
?>
We accept reports of problems or other inducements related to the use of our products and services.
helpdesk@platon.net +421 222 111 321
In case you need any help, contact us by e-mail or by phone.
Give a chance to our online help-center. You can find there more than:
Questions about our products or any specific request? Contact us.