htacess redirection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • klinton
    So Fucking Banned
    • Apr 2003
    • 8766

    #1

    htacess redirection

    I would like to redirect all french speaking traffic coming to my domain to some site...WITH EXCEPTION for few referers(that traffic wouldn't be redirected)....how to do this ?

    thx....
  • CunningStunt
    Confirmed User
    • Aug 2006
    • 5594

    #2
    Use Maxmind

    Comment

    • klinton
      So Fucking Banned
      • Apr 2003
      • 8766

      #3
      bump......

      Comment

      • fris
        Too lazy to set a custom title
        • Aug 2002
        • 55679

        #4
        Originally posted by klinton
        I would like to redirect all french speaking traffic coming to my domain to some site...WITH EXCEPTION for few referers(that traffic wouldn't be redirected)....how to do this ?

        thx....
        try this

        Code:
        RewriteEngine on
        RewriteCond %{HTTP:Accept-Language} (fr) [NC]
        RewriteCond %{HTTP_REFERER} !^http://(www\.)?allowsite\.com/.*$ [NC]
        RewriteCond %{HTTP_REFERER} !^http://(www\.)?allowsite\.com/.*$ [NC]
        RewriteCond %{HTTP_REFERER} !^http://(www\.)?allowsite\.com/.*$ [NC]
        RewriteRule .* [url]http://www.domain.com/redirect-url[/url] [R,L]
        Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

        Comment

        • klinton
          So Fucking Banned
          • Apr 2003
          • 8766

          #5
          hmm thx, it looks like that it works, but the small problem is that even with valid referer, it only loads html of site, no images....just like with hotlinking protection, but i have no hotlinking protection in there....

          Comment

          • klinton
            So Fucking Banned
            • Apr 2003
            • 8766

            #6
            bump........

            Comment

            • fris
              Too lazy to set a custom title
              • Aug 2002
              • 55679

              #7
              try enabling multiviews
              Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

              Comment

              • sarettah
                see you later, I'm gone
                • Oct 2002
                • 14301

                #8
                Originally posted by klinton
                hmm thx, it looks like that it works, but the small problem is that even with valid referer, it only loads html of site, no images....just like with hotlinking protection, but i have no hotlinking protection in there....
                Are the pages you are redirecting to in another folder? and if so, Do you have an htaccess file in the folder that the pages you redirect to are located?

                That is the htaccess that would be controlling the pages not the htaccess that did the redirect.
                All cookies cleared!

                Comment

                Working...