Do you know alot about Apache? I need answer to a question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BRISK
    Too lazy to set a custom title
    • Feb 2003
    • 12240

    #1

    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?
    I post on GFY so that when people ask me what I do,
    I can tell them that I work with the mentally retarded.
  • iroc409
    Confirmed User
    • Jan 2003
    • 4728

    #2
    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.
    <a href="http://www.iroc409.com/"><img src="http://www.iroc409.com/adv/120x60.gif" border=0></a>


    icq: 1 7 6 4 2 0 9 6 0
    Gallery templates for ONLY $25! w00t!

    Comment

    • iroc409
      Confirmed User
      • Jan 2003
      • 4728

      #3
      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.
      <a href="http://www.iroc409.com/"><img src="http://www.iroc409.com/adv/120x60.gif" border=0></a>


      icq: 1 7 6 4 2 0 9 6 0
      Gallery templates for ONLY $25! w00t!

      Comment

      • BRISK
        Too lazy to set a custom title
        • Feb 2003
        • 12240

        #4
        I don't want to use PHP, CGI or .htaccess
        I post on GFY so that when people ask me what I do,
        I can tell them that I work with the mentally retarded.

        Comment

        • kevinale
          Confirmed User
          • Dec 2002
          • 2115

          #5
          I can help you but it is a PHP based hack. See sig. I know, "no php." is that steadfast?
          Last edited by kevinale; 03-18-2003, 10:19 PM.
          1monkey0cup.com

          Comment

          • BRISK
            Too lazy to set a custom title
            • Feb 2003
            • 12240

            #6
            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?
            I post on GFY so that when people ask me what I do,
            I can tell them that I work with the mentally retarded.

            Comment

            • kad
              Confirmed User
              • Feb 2003
              • 735

              #7
              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
              lol internet.

              Comment

              • kevinale
                Confirmed User
                • Dec 2002
                • 2115

                #8
                Originally posted by BRISK
                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?
                You could use mod_rewrite and rewrite the .html to .php thus giving you the ability to use php.
                1monkey0cup.com

                Comment

                • kevinale
                  Confirmed User
                  • Dec 2002
                  • 2115

                  #9
                  Originally posted by BRISK
                  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?

                  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.
                  1monkey0cup.com

                  Comment

                  • kad
                    Confirmed User
                    • Feb 2003
                    • 735

                    #10
                    Originally posted by kevinale


                    You could use mod_rewrite and rewrite the .html to .php thus giving you the ability to use php.
                    Umm, why not just add .html to the AddType line in that case? Ie:

                    AddType application/x-httpd-php .php .htm .html

                    Anyhow, this doesn't solve his problem, as he doesn't want to use php.
                    lol internet.

                    Comment

                    • xerox
                      Confirmed User
                      • Feb 2003
                      • 672

                      #11
                      rtfm

                      Comment

                      • Danielle
                        Confirmed User
                        • Jun 2002
                        • 1227

                        #12
                        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

                        Comment

                        • myneid
                          Confirmed User
                          • Jan 2003
                          • 738

                          #13
                          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
                          Tanguy 0x7a69 inc. Programmer/President/CEO
                          http://www.0x7a69.com
                          A Leader in Programming since 1996
                          PHP, Ruby on Rails, MySQL, PCI DSS, and any Technical Consulting

                          Comment

                          • rossiya2
                            Confirmed User
                            • Nov 2002
                            • 287

                            #14
                            Originally posted by myneid
                            hahahahahahahahahaha to redirect the page. so on the front html page you would put like hahahahahahahaha language=hahahahahahahahahaha
                            A secret it remains apparently.
                            <a href="mailto:[email protected]">sales@cologroup. com</a> | 52027820 | <a href="http://www.cologroup.com">www.cologroup.com</a>

                            Comment

                            • myneid
                              Confirmed User
                              • Jan 2003
                              • 738

                              #15
                              the hhahaha is
                              script language= java script
                              with no spaces in the = and java and script
                              Tanguy 0x7a69 inc. Programmer/President/CEO
                              http://www.0x7a69.com
                              A Leader in Programming since 1996
                              PHP, Ruby on Rails, MySQL, PCI DSS, and any Technical Consulting

                              Comment

                              • rossiya2
                                Confirmed User
                                • Nov 2002
                                • 287

                                #16
                                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
                                <a href="mailto:[email protected]">sales@cologroup. com</a> | 52027820 | <a href="http://www.cologroup.com">www.cologroup.com</a>

                                Comment

                                • BRISK
                                  Too lazy to set a custom title
                                  • Feb 2003
                                  • 12240

                                  #17
                                  Thanks for the replies. I'm gonna try that maxmind module and see if that works
                                  I post on GFY so that when people ask me what I do,
                                  I can tell them that I work with the mentally retarded.

                                  Comment

                                  • BRISK
                                    Too lazy to set a custom title
                                    • Feb 2003
                                    • 12240

                                    #18
                                    Any other suggestions?
                                    I post on GFY so that when people ask me what I do,
                                    I can tell them that I work with the mentally retarded.

                                    Comment

                                    • sacX
                                      Confirmed User
                                      • Dec 2002
                                      • 2998

                                      #19
                                      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]
                                      Have Asian Language Traffic?

                                      Comment

                                      • BRISK
                                        Too lazy to set a custom title
                                        • Feb 2003
                                        • 12240

                                        #20
                                        cool, thanks...I'm gonna try it out and see how it works
                                        I post on GFY so that when people ask me what I do,
                                        I can tell them that I work with the mentally retarded.

                                        Comment

                                        Working...