Good afternoon, I ran into the problem of duplicate redirects via .htaccess. I looked at similar posts, but did not find a solution to my problem.

Tell me, please, how to make a redirect:

  • from http://site.ru/index.php?blablabla to http://site.ru

  • from http://site.ru/ to http://site.ru

  • from http://site.ru/?blablabla to http://site.ru

Engine - modx Revolution.

    1 answer 1

    Make an .htaccess file on the old domain1.ua domain, containing:

     RewriteEngine On RewriteCond %{HTTP_HOST} domain1.com RewriteRule (.*) http://domain2.com/$1 [R=301,L] 

    option 2

      RewriteCond %{REQUEST_URI} ^/test/$ RewriteRule ^.*$ http://domain1.com/new-test/? [R=301,L] 

    and then set up hosting redirection

    • This is all one domain - Aleksei Sievriukov
    • @AlekseiSievriukov finished - Paulo Berezini