how to allow only 1 ip address to access wordpress rss feed?

Discussion in 'XML & RSS' started by rolysatch, Jan 26, 2008.

  1. #1
    i have a particular site of mine that i want to only allow 1 ip address to access the rss feed on wordpress blog, has anyone got any ideas how i could go about this? any advice appreciated.

    thanks in advance

    roland
     
    rolysatch, Jan 26, 2008 IP
  2. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #2
    You can do it through your .htaccess file

    Example (replace rss.xml with the name of your rss file):

    
    # IPs Range: 64.124.122.224 - 64.124.122.255
    SetEnvIf Remote_Addr "^64\.124\.122\.2(2[4-9]|[3-5][0-9])"  ilikeit
    # IPs Range: 217.22.96.0 - 217.22.97.255
    SetEnvIf Remote_Addr "^217\.22\.9(6¦7)\."  ilikeit
    # IP 38.100.208.101
    SetEnvIf Remote_Addr "^38\.100\.208\.101"   ilikeit
    
    <Files "rss.xml">
       Order Deny,Allow
       Deny from all
       Allow from env=ilikeit
    </Files>
    
    Code (markup):
     
    ajsa52, Jan 28, 2008 IP