TCH-JimE Posted July 17, 2003 Share Posted July 17, 2003 Hi, I have been playing around with my htaccess file today after someone hit me over night with a teleport pro which I thought I had banned. Now that I have worked out my error, and updated the list, i get this error log message: >/home/username/public_html/.htaccess: RewriteCond: bad flag delimiters Now from what I can tell, one of my strings in the htaccess rewritecond is wrong, but which one? >RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^almaden [OR] RewriteCond %{HTTP_USER_AGENT} ^Anarchie [OR] RewriteCond %{HTTP_USER_AGENT} ^ASPSeek [OR] RewriteCond %{HTTP_USER_AGENT} ^attach [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^BackWeb [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Bandit [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^BatchFTP [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot@yahoo.com [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR] RewriteCond %{HTTP_USER_AGENT} ^Buddy [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^CherryPicker [OR] RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Collector [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Copier [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^CICC [OR] RewriteCond %{HTTP_USER_AGENT} ^Crescent [OR] RewriteCond %{HTTP_USER_AGENT} ^Custo [OR] RewriteCond %{HTTP_USER_AGENT} ^DA [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^.*DigExt.*$ [OR] RewriteCond %{HTTP_USER_AGENT} ^DIIbot [OR] RewriteCond %{HTTP_USER_AGENT} ^DISCo\ Pump [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Download\ Wonder [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Downloader [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Drip [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^DSurf15a [OR] RewriteCond %{HTTP_USER_AGENT} ^EasyDL [OR] RewriteCond %{HTTP_USER_AGENT} ^eCatch [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^EmailCollector [OR] RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR] RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR] RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR] RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^FileHound [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^FlashGet [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^frontpage [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^GetRight [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^GetSmart [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR] RewriteCond %{HTTP_USER_AGENT} ^gigabaz [OR] RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^gotit [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Grabber [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^GrabNet [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Grafula [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^grub-client [OR] RewriteCond %{HTTP_USER_AGENT} ^HMView [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^HTTrack [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^httpdown [OR] RewriteCond %{HTTP_USER_AGENT} ^ia_archiver [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Indy\ Library [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^InterGET [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^InternetSeer.com [OR] RewriteCond %{HTTP_USER_AGENT} ^Iria [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Irvine [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^JetCar [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^JOC [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^JustView [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^larbin [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^LexiBot [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^lftp [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Link [OR] RewriteCond %{HTTP_USER_AGENT} ^linkwalker [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^likse [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Magnet [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Mag-Net [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Memo [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^microsoft.url [OR] RewriteCond %{HTTP_USER_AGENT} ^Microsoft.URL [OR] RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Mirror [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^MS\ FrontPage [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^MSIECrawler [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^MSProxy [OR] RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*NEWT [OR] RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*Indy [OR] RewriteCond %{HTTP_USER_AGENT} ^Navroad [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^NearSite [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^NetAnts [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^NetSpider [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^NetZip [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Ninja [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^NICErsPRO [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^NPBot [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Octopus [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR] RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^pavuk [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Ping [OR] RewriteCond %{HTTP_USER_AGENT} ^Pockey [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^psbot [OR] RewriteCond %{HTTP_USER_AGENT} ^Pump [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^RealDownload [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Reaper [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Recorder [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^ReGet [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Siphon [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^sitecheck.internetseer.com [OR] RewriteCond %{HTTP_USER_AGENT} ^SlySearch [OR] RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Snake [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^SpaceBison [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Stripper [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Sucker [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^SuperBot [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Surfbot [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^SlySearch [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^turnitinbot [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Vacuum [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^WebCopier [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^WebEMailExtrac.* [OR] RewriteCond %{HTTP_USER_AGENT} ^.*WebMiner.*$ [OR] RewriteCond %{HTTP_USER_AGENT} ^Webster [OR] RewriteCond %{HTTP_USER_AGENT} ^[Ww]eb(\ Image¦\ Sucker¦Auto¦[Bb]andit¦Fetch¦site¦ZIP¦.*er) [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^.*WebStripper.*$ [OR] RewriteCond %{HTTP_USER_AGENT} ^Wget [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Whacker [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Widow [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Xaldon [OR] RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster RewriteRule /*$ http://www.fade-away-into-no-where.com [R,L] Any ideas fellow Total Choice Web Hosting family? Because its driving me insane and its too hot to think. Jim Quote Link to comment Share on other sites More sharing options...
surefire Posted July 17, 2003 Share Posted July 17, 2003 I'm sorry I'm not more up to speed with .htaccess. I know just enough to get one or two things done. But that is some kinda list! You could start your own deck of cards with people you've banned from your site. Quote Link to comment Share on other sites More sharing options...
Wilexa Posted July 17, 2003 Share Posted July 17, 2003 Do you need to escape the bangs(!)? Like \! Just a thought. Otherwise it looks pretty good from a human point of view! BTW, Did you set RewriteLogLevel to 0 or are you keeping track of all those bots? Good Luck, Dave Quote Link to comment Share on other sites More sharing options...
Singer Posted July 17, 2003 Share Posted July 17, 2003 I have no experience with rewriteCond, but what about trying a binary search: split the file in two (of course, keeping whatever common stuff you need) and keep doing that until you track down the line with the error. Quote Link to comment Share on other sites More sharing options...
surefire Posted July 17, 2003 Share Posted July 17, 2003 I like Singer's line of thought. Quote Link to comment Share on other sites More sharing options...
Wilexa Posted July 17, 2003 Share Posted July 17, 2003 Yep, the old binary debugging technique usually works. One more thing, Jim: Most of your periods (dots) are followed by *, which is a good wild-card way of finding a bunch of things, but some of them look like "real" dots and so should be escaped: sitecheck.internetseer.com should be sitecheck\.internetseer\.com same for microsoft.url, yahoo.com and the rest. ...Dave Quote Link to comment Share on other sites More sharing options...
idallen Posted July 18, 2003 Share Posted July 18, 2003 /home/username/public_html/.htaccess: RewriteCond: bad flag delimiters I went to the Apache source code to find out what causes that error. Here it is: > if (str[0] != '[' || str[strlen(str)-1] != ']') { return "RewriteCond: bad flag delimiters"; } In other words, if the delimiter at the start of the flag part (the [OR] thing at the end) is not a left bracket, or the delimiter at the end of the flag part is not a right bracket, you see that error. The RewriteCond line must have exactly four fields. Some things to check: - that you have no unescaped blank in one of the lines (i.e. xxxxx\ yyyyy containing two blanks, only one of which is escaped) - that lines ending in a backslash have no blanks after them I copied your posting and pasted it into my own .htaccess file and it gave no errors; but, I don't know if the cut/paste between you and me removed duplicate blanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.