Geronantimo
Technical User
I am planning some site upgrades.
Currently, I have an index.php file that redirects visitors according to the language of their browser:
I need to replace the existing index.php in the root directory with a new index.php that can only be visited from my IP address. In addition, I need the index.php to be loaded in my browser when I enter the domain url (
I have added the following to .htaccess:
which denies all but my IP, however, I am stuck as to redirect all other visitors.
I'm sure many people have managed this in the past, but I have been unable to discover how - Any tips greatly appreciated.
Currently, I have an index.php file that redirects visitors according to the language of their browser:
Code:
<?php
if(strstr($HTTP_ACCEPT_LANGUAGE,"en")) {
Header("Location: [URL unfurl="true"]http://www.DOMAIN.com/000/?sLang=en");[/URL]
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"sv")) {
Header("Location: [URL unfurl="true"]http://www.DOMAIN.com/000/?sLang=sv");[/URL]
}
else {Header("Location: [URL unfurl="true"]http://www.DOMAIN.com/000/?sLang=en");[/URL]
}
?>
I need to replace the existing index.php in the root directory with a new index.php that can only be visited from my IP address. In addition, I need the index.php to be loaded in my browser when I enter the domain url (
I have added the following to .htaccess:
Code:
<Limit GET POST PUT>
order deny,allow
deny from all
allow from 12.345.67.89
</LIMIT>
I'm sure many people have managed this in the past, but I have been unable to discover how - Any tips greatly appreciated.