I have a website that was hosted in n*agahoster, which already expired (with active status) since our company didn't want to use the domain example.com and instead change the hosting place to a government's server which resulting to a new domain example.gov.xx
The procedure was not hard, since there is someone who handle the server, and I just gave the backup files (the public_html as well as the database) from old hosting place. Everything went smoothly, until I tried to access the new domain (example.gov.xx), instead of showing me the actual webpage, it directed me to old domain (example.com) which already expired and can't be access. This only happened on a certain time though, if I keep refreshing the web, using different browser, or try to access it later, it will show the correct domain as well as the webpage, BUT it only appeared in my own PC, and if my friends want to access the new domain (example.gov.xx) it will still direct them to the old webpage (example.com) and they have to keep on trying or use different browser, to actually access the correct new domain.
Why can this happen? I already change the link of the old domain to the new domain in my index.php file. Is there anything that I should add or change? Is it the .htaccess file?
v3/index.php
.htaccess file
The procedure was not hard, since there is someone who handle the server, and I just gave the backup files (the public_html as well as the database) from old hosting place. Everything went smoothly, until I tried to access the new domain (example.gov.xx), instead of showing me the actual webpage, it directed me to old domain (example.com) which already expired and can't be access. This only happened on a certain time though, if I keep refreshing the web, using different browser, or try to access it later, it will show the correct domain as well as the webpage, BUT it only appeared in my own PC, and if my friends want to access the new domain (example.gov.xx) it will still direct them to the old webpage (example.com) and they have to keep on trying or use different browser, to actually access the correct new domain.
Why can this happen? I already change the link of the old domain to the new domain in my index.php file. Is there anything that I should add or change? Is it the .htaccess file?
v3/index.php
PHP:
<script>
setTimeout(function(){
window.location.href = 'http://example.gov.xx/v3/public/'; //The old one is example.com/v3/public
// window.location.href = 'http://localhost/folder/v3/public/?SI-xxxxxxxxx=YWN0PWhvbWU%3D'; //ignore this
}, 10000);
</script>
.htaccess file
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]