![]() |
Do you know alot about Apache? I need answer to a question
I don't know much about Apache, but I'll describe what I'm trying to do.
I have a domain that gets traffic from search engines. Can I do something in Apache to re-direct visitors to another URL based on their country? I've been looking at this ---> www.maxmind.com , and it says it works with Apache using mod_geoip I don't want to use PHP, CGI or .htaccess. These visitors are visiting pure .html pages. These visitors are coming to my domain through lots of different .html pages, I want them to click on the link in the SE and if they're from certain countries that I choose, they will be redirected to a different URL Is this possible? |
you can still use .htaccess to redirect html pages, without a password. same way with 404s and stuff. look up on google how to do that, there's all kinds of crazy stuff for that. you can even deny referring domains and such.
|
i didn't mean referrers, although you might. you can deny ips and domains, so if a user works at microsoft, you can deny them access to your page.
|
I don't want to use PHP, CGI or .htaccess
|
I can help you but it is a PHP based hack. See sig. I know, "no php." is that steadfast?
|
Surfers come to my pages from links like
http://www.mydomain.com/blah/page.html They are clicking on URLs from search engines that end in .html not php or cgi pages. Can Apache (using something like www.maxmind.com ) recognize the country they are from and redirect them to another URL? |
Yes, I'm 99% sure you could, although, I've never done it.
You could install the GeoIP Apache Module, and set up a redirect based in the information it provides. I could look further into it for you if you dont get a better answer from anyone else. Feel free to hit me up on 173229403 or kad at fakeplasticrobot.com |
Quote:
|
Quote:
Or even better yet, you can make php parse html pages also with an AddType in the httpd.conf. And add the PHP into yout .html files. |
Quote:
AddType application/x-httpd-php .php .htm .html Anyhow, this doesn't solve his problem, as he doesn't want to use php. |
rtfm :1orglaugh
|
Add this line to your .htaccess file.
AddType application/x-httpd-php .html Then you can use a product like http://www.trafficassistant.com/ in .html files. Hugs, Danielle |
profit plantation sets it up in a cool way that may be applicable to you. if you used a php program that would check the country and if it should redirect it would print out the hahahahahahahahahaha to redirect the page. so on the front html page you would put like hahahahahahahaha language=hahahahahahahahahaha src=http://mydomain.com/countrylookup.php></hahahahahahahaha
and so if it was us it wouldnt do anything theres my secret solution of the day |
Quote:
|
the hhahaha is
script language= java script with no spaces in the = and java and script |
I had to support multiple languages and detect dialect preferences of the surfer. The Russian Apache server can do this without additional programming. I haven't tried the vanilla Apache for such situations. But it seems that the following variable's language setting can be used with a filesmatch directive using the httpd.conf file alone:
'HTTP_USER_AGENT' Contents of the User_Agent: header from the current request, if there is one. This is a string denoting the user agent being which is accessing the page. A typical example is: Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586). Among other things, you can use this value with get_browser() to tailor your page's output to the capabilities of the user agent. My chatbot is http://www.cologroup.net/html/chat/frame2.html |
Thanks for the replies. I'm gonna try that maxmind module and see if that works
|
Any other suggestions?
|
install mod_geoip..
then use mod_rewrite in httpd.conf for the domain you're interested in sort of like this RewriteEngine on RewriteCond %{GEOIP_COUNTRY_CODE} ^US$ RewriteRule ^/$ /newlocation.html [L] |
cool, thanks...I'm gonna try it out and see how it works :thumbsup
|
All times are GMT -7. The time now is 05:14 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123