www.platon.net
If your website is running under several domain names, it is recommended to choose one main domain and make the redirection from other domains to the selected one. Place this part of the code at the beginning of your PHP script.
<?php
$redirect = 'platon.sk';
$http_host = @$_SERVER['HTTP_HOST'];
$req_uri = @$_SERVER['REQUEST_URI'];
if (strlen($http_host) > 0
&& strcasecmp($http_host, $redirect))
{
header("Location: http://$redirect$req_uri");
exit;
}
?>
The main advantages of this solution are mostly within the area of Search Engine Optimization (SEO):
You can solve this problem using the .htaccess file as well.
Redirect from www to non-www:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^ %{REQUEST_SCHEME}://%1%{REQUEST_URI} [R=301,L]
</IfModule>
Redirect from non-www to www:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ %{REQUEST_SCHEME}://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
We accept problem reports and any other feedback related to the use of our products and services.
helpdesk@platon.net +421 222 111 321
In case you need any help, contact us by e-mail or by phone.
Give our online help center a try. You will find more than:
Questions about our products or any specific request? Contact us.