htaccess question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pusser
    So Fucking Banned
    • Aug 2003
    • 85

    #1

    htaccess question

    If I want to redirect all Arabic Language Browsers would the following work:

    RehahahahahaCond %{HTTP:Accept-Language} ar* [NC]
    RehahahahahaRule .* http://www.yahoo.com

    My question is about the "ar*" , is that correct?

    I would like to avoid having multiple lines for: ar-dz, ar-bh, etc...
    So I am guessing putting a * is a wildcard?

    Thx!
  • juicylinks
    So Fucking Banned
    • Apr 2001
    • 122992

    #2

    Comment

    • Lycanthrope
      Confirmed User
      • Jan 2004
      • 4517

      #3
      yes ar is correct, but you do not need the wild card.

      Comment

      • PrivateIvy
        Confirmed User
        • Oct 2003
        • 4257

        #4
        There are some really good tools/tips for htaccess here:

        http://www.clockwatchers.com/htaccess_tool.html



        Ivy

        Comment

        • Pusser
          So Fucking Banned
          • Aug 2003
          • 85

          #5
          But without the wild card I would need multiple lines to block
          all the Arabic codes right? i.e.:

          RehahahahahaCond %{HTTP:Accept-Language} ar-dz [NC]
          RehahahahahaRule .* http://www.yahoo.com
          RehahahahahaCond %{HTTP:Accept-Language} ar-bh [NC]
          RehahahahahaRule .* http://www.yahoo.com
          RehahahahahaCond %{HTTP:Accept-Language} ar-eg [NC]
          RehahahahahaRule .* http://www.yahoo.com
          RehahahahahaCond %{HTTP:Accept-Language} ar-iq [NC]

          I would like to block all browsers that have ar followed by anything. So if not a *, what would I use?

          Thx!

          Comment

          • Lycanthrope
            Confirmed User
            • Jan 2004
            • 4517

            #6
            I believe if you put a start of line anchor ie: ^ in front of the language code it'll cover them all.

            ^ar [NC]

            would get ar-dz, ar-bh, etc...

            Comment

            • Fabien
              Confirmed User
              • Jul 2003
              • 4789

              #7
              Arabic Language Browsers ?

              For what ?


              Comment

              • Lycanthrope
                Confirmed User
                • Jan 2004
                • 4517

                #8
                Originally posted by Fabien
                Arabic Language Browsers ?

                For what ?


                Maybe for redirecting them to dialers or worse

                Comment

                • mryellow
                  Confirmed User
                  • May 2001
                  • 934

                  #9
                  Originally posted by Lycanthrope
                  I believe if you put a start of line anchor ie: ^ in front of the language code it'll cover them all.

                  ^ar [NC]

                  would get ar-dz, ar-bh, etc...
                  Correct. ^ is start of string $ is end of str-ing.

                  http://www.webpimps.com/scripts/htaccess/

                  -Ben
                  Cyberwurx Hosting
                  After trying 5 different hosts, I found the best.
                  Since 1997 I've had 2 hours of downtime.
                  Fast support, great techs, no hype, no gimmicks.

                  <- I in no way endorse whatever just got stuck on the left of my post.

                  Comment

                  • mryellow
                    Confirmed User
                    • May 2001
                    • 934

                    #10
                    oh btw...

                    ar*

                    * isn't the wildcard character the period (.) is.

                    .* = anything zero or more times

                    .+ = anything 1 or more times.

                    -Ben
                    Cyberwurx Hosting
                    After trying 5 different hosts, I found the best.
                    Since 1997 I've had 2 hours of downtime.
                    Fast support, great techs, no hype, no gimmicks.

                    <- I in no way endorse whatever just got stuck on the left of my post.

                    Comment

                    • cayne
                      My time is coming...
                      • Jan 2004
                      • 7475

                      #11
                      Originally posted by Lycanthrope
                      yes ar is correct
                      yep. he's right.
                      If lesbian anal is wrong, I don't want to be right.

                      Comment

                      Working...