1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Please help me with .htaccess code...

Discussion in 'Apache' started by abraxas, Jun 26, 2014.

  1. #1
    Hi all,

    I would like to ask for some help.
    I have blocked all the referrers from few TLDs via .htaccess
    I want to ask if somebody can help me to exclude a single or few URLs from those.
    SEMrush
    What I need is to keep these TLD referrals blocked, but allow an exception for yandex.ru for example?
    Any ideas?

    Thanks very much in advance!!!

    p.s. I cannot add the exact code here as DP returns some error, but it is correct - I just cannot exclude a single URL...
     
    abraxas, Jun 26, 2014 IP
    SEMrush
  2. fare

    fare Active Member

    Messages:
    89
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    95
    #2
    Is this alright with you? It basically allow referrers from yandex.ru and deny all other referrers.

    or let's say you want to allow referrers from yandex.ru while deny other referrers from only .ru and .cn TLD (amend the list accordingly).

    Hope it works for you! :)
     
    Last edited: Jul 6, 2014
    fare, Jul 6, 2014 IP
    abraxas likes this.
  3. abraxas

    abraxas Well-Known Member

    Messages:
    1,422
    Likes Received:
    44
    Best Answers:
    1
    Trophy Points:
    125
    #3
    Thank you very much!!!
    It should work, I have to go out now, but will try it out tomorrow.
    Cheers and thanks again!
     
    abraxas, Jul 6, 2014 IP