php - How To redirect Multiple Alternate URLs to a parent URL through HTACCESS -
i have parent url website
https://www.günstiger-reisen.de
and there alternate urls site can accessed followings:
alternate url 1: http://günstiger-reisen.de/index.php alternate url 2: https://www.xn--gnstiger-reisen-zvb.de/index.php alternate url 3: http://www.xn--gnstiger-reisen-zvb.de/index.php alternate url 4: http://xn--gnstiger-reisen-zvb.de/index.php alternate url 5: www.xn--gnstiger-reisen-zvb.de/index.php
but want redirect these urls main parent site url every time user access site alternate website url redirect parent main url.
i have tried follows in case 1 url can redirected , think not proffered way so.
redirect 301 /contact.php http://example.com/contact-us.php
any regarding task?
you can use rule in site root .htaccess:
rewriteengine on rewritecond %{http_host} !^www\. [nc,or] rewritecond %{https} off [or] rewritecond %{the_request} \s/+index\.php[?/\s] [nc] rewriterule ^ https://www.günstiger-reisen.de/ [l,ne,r=301]
Comments
Post a Comment