htaccess redirect issue

IXPLANET

Verified User
Joined
Jul 7, 2019
Messages
93
Hello did anyone have same issue with htaccess redirect?
i have an issue for subdomain redirect

1. in redirect menu in control panel only path directory can set for
redirect and for list subdomain was i created before not add in there.
of course we can set directly in htaccess but i think it must be in
redirect menu in control panel for list subdomain because make user
confuse .

2. after setup redirect subdomain in control panel i see in htaccess code
like this
Redirect 301 /subdomain https://sample.com

or if we want directly set for subdomain redirect also not work
Redirect 301 https://sub.domain.com https://newsite.com

this default syntax not working for redirect.


and redirect work only work if we use code

RewriteCond %{HTTP_HOST} ^sub.domain.com [NC]
RewriteRule ^(.*)$ https://newsite.com [L,R=301,NC]

* we use apache only and php 7

Can you tell whats wrong and how to fixed that

thanks
 
Last edited:
Back
Top