how to redirect the vistors from the old url exm gamehup.000webhostapp.com to the new one exm gamehup.ga using htaccess file
Hi @AwadGorg
Put this in your .htaccess file
RewriteEngine on
RewriteCond %{HTTP_HOST} ^gamehup.000webhostapp.com[NC,OR]
RewriteCond %{HTTP_HOST} ^gamehup.000webhostapp.com[NC]
RewriteRule ^(.*)$ https://gamehup.ga/$1 [L,R=301,NC]
I hope it would work
it did’nt work
stiil going to the old domain
this is the htaccess redirect file
RewriteEngine On
RewriteCond %{HTTP_HOST} ^gamehup.000webhostapp.com[NC]
RewriteRule ^(.)$ http://gamehup.tk/$1 [L,R=301,NC]
RewriteCond %{HTTP_HOST} ^www.gamehup.tk$
RewriteRule ^/?$ “http://gamehup.tk/” [R=301,L]
RewriteCond %{HTTP_USER_AGENT} libwww-perl.
RewriteRule .* ? [F,L]
and by the way i change the domain name to gamehup.tk
Hi @AwadGorg
You have use the wrong code. Put gamehup.000webhostapp.com in place of the first gamehup.tk
sorry am not getting what you trying to say
i use this RewriteCond %{HTTP_HOST} ^www.gamehup.tk$
RewriteRule ^/?$ “http://gamehup.tk/” [R=301,L]
to redirect from the www to none www
and this RewriteCond %{HTTP_HOST} ^gamehup.000webhostapp.com[NC]
RewriteRule ^(.*)$ http://gamehup.tk/$1 [L,R=301,NC] to redirect the old domain to the new one
You are using wrong code. Copy and paste the code that I have provided it would help you.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^gamehup.000webhostapp.com[NC,OR]
RewriteCond %{HTTP_HOST} ^www.gamehup.000webhostapp.com[NC]
RewriteRule ^(.*)$ https://gamehup.tk/$1 [L,R=301,NC]
Hi @AwadGorg
Add following to your old domain’s index page (at the top).
header("Location: http://gamehup.tk")