![]() |
How to show a geoip warning page without using htaccess?
Any tips on how to show a geoip warning page when someone visits a site without using htaccess? I don't want to use htaccess because of server load on high traffic sites.
Thanks :upsidedow |
|
Indeed, MaxMind is kinda the defacto standard for GeoIP in terms of PHP :)
|
can do it with php or javascript, dozens of ways actually depending on what exactly you are trying to acomplish...
|
MaxMind of course. That's kickass.
|
PHP Code:
|
U can use php & mysql IP database.
ip2nation.com, U can find instructions how to use, I found it 95% accurate, and U are not depend on the third party. |
Quote:
.htaccess is the fastesT way and lowest server load, where do you get your info from? |
Quote:
solution is to use an external file with htaccess geoip so the initial page loads faster. i.e. instead of serving page after checking htaccess , serve page first , call htaccess from an external file such as a javascript |
or you can do it based on he language without any lib
|
.htaccess should not ever be used unless you don't have control over your own web server...
In fact I'd highly recommend you don't run Apache... it's bloated and ass slow compared to newer web servers... You can't really beat nginx serving PHP via Fast-CGI. I've taken 12 box Apache deployments down to 4 nginx boxes and still had less load than all 12 boxes running Apache... |
php + session
php or js + cookie |
Quote:
My sites are in English and I only want to pop a warning page for one country and based on the browser language would be fine. Also I don't want to mess up my SE rankings. Is there a really simple way to accomplish this? |
With regards to not wanting to mess up SE rankings for showing a warning page for one specific country, would a Javascript redirect be a good idea as I don't think SE bots parse javascripts?
|
Bump for me :upsidedow
|
Quote:
Code:
<?php |
All times are GMT -7. The time now is 09:39 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc