Rewrite USER agent to specific file

Discussion in 'Apache' started by bdj, Nov 5, 2009.

  1. #1
    I bought an old site and now it seems allot of people are accessing it with feedburner.

    I want to rewrite all files USER_AGENT Feedburner access to 1 specific RSS file.

    Log file:
    "GET /index.php?mact=News,cntnt01,rss&cntnt01showtemplate=false&cntnt01category=&cntnt01number=20&cntnt01returnid=75 HTTP/1.0" 404 14612 "-" "FeedBurner/1.0 (http://www.FeedBurner.com)"
    "GET /artikelen/?feed=rss2 HTTP/1.0" 404 - "-" "FeedBurner/1.0 (http://www.FeedBurner.com)"

    I have this in my Htacces file. The problem with it is, it creates a loop, when Feedburner is rewriten to /cache/rss.xml, it's rewriten again.

    RewriteCond %{HTTP_USER_AGENT} ^FeedBurner* [NC]
    RewriteRule ^(.*)$ /cache/rss.xml [L,R=302]
     
    bdj, Nov 5, 2009 IP