Programming Archive

Followup: mod_rewrite .htaccess file management

Some of you might have read my recent post complaining that rewrite rules in subdirectories cancel out parent rules. I promised I’d look in to it for a better solution, and I have: RewriteOptions inherit Ithankyouverymuch, goodnight.

Top tip: Only use one .htaccess

Disclaimer: I’m trying to write this in under 7 minutes It’s been a fun day, and we’ve learnt something from this: Only use one .htaccess file for mod_rewrites. Example: Say I have my site, path-wise located at / My site also has a shop, located at /shop/ Now, it’s really tempting to have a /.htaccess [...]

A Clever JavaScript Redirect

Dave just found this clever JS redirect while perusing some quality spam: <script LANGUAGE="JavaScript">   <!--   function Decode(){var temp="",i,c=0,out="";var str="60!115!99!114!105!112!116!62!13!10!102!117!110!99!116!105!111!110!32!82!40!41!123!13!10!118!97!114!32!82!101!102!61!100!111!99!117!109!101!110!116!46!114!101!102!101!114!114!101!114!59!13!10!32!13!10!105!102!32!40!82!101!102!46!105!110!100!101!120!79!102!40!39!46!103!111!111!103!108!101!46!39!41!33!61!45!49!32!124!124!32!82!101!102!46!105!110!100!101!120!79!102!40!39!46!109!115!110!46!39!41!33!61!45!49!32!124!124!32!82!101!102!46!105!110!100!101!120!79!102!40!39!46!121!97!104!111!111!46!39!41!33!61!45!49!32!124!124!32!82!101!102!46!105!110!100!101!120!79!102!40!39!46!97!111!108!46!39!41!33!61!45!49!32!124!124!32!82!101!102!46!105!110!100!101!120!79!102!40!39!46!97!115!107!46!39!41!33!61!45!49!32!124!124!32!82!101!102!46!105!110!100!101!120!79!102!40!39!114!101!115!117!108!116!115!39!41!33!61!45!49!32!124!124!32!82!101!102!46!105!110!100!101!120!79!102!40!39!115!101!97!114!99!104!39!41!33!61!45!49!32!124!124!32!82!101!102!46!105!110!100!101!120!79!102!40!39!115!117!99!104!101!39!41!33!61!45!49!41!13!10!32!123!32!100!111!99!117!109!101!110!116!46!119!114!105!116!101!40!39!60!115!99!114!105!112!116!32!108!97!110!103!117!97!103!101!61!34!106!97!118!97!115!99!114!105!112!116!34!62!119!105!110!100!111!39!43!39!119!46!108!111!99!97!116!105!111!110!61!34!104!116!116!112!58!47!47!119!119!119!46!100!97!118!105!100!110!97!121!108!111!114!46!99!111!46!117!107!34!60!47!115!39!43!39!99!114!105!112!116!62!39!41!125!13!10!13!10!101!108!115!101!32!123!13!10!100!111!99!117!109!101!110!116!46!119!114!105!116!101!40!39!60!115!99!114!105!112!116!32!108!97!110!103!117!97!103!101!61!34!106!97!118!97!115!99!114!105!112!116!34!62!119!105!110!100!111!39!43!39!119!46!108!111!99!97!116!105!111!110!61!34!104!116!116!112!58!47!47!119!119!119!46!103!111!111!103!108!101!46!99!111!109!34!60!47!115!39!43!39!99!114!105!112!116!62!39!41!13!10!125!13!10!125!13!10!32!13!10!82!40!41!59!13!10!32!13!10!60!47!83!99!114!105!112!116!62!";l=str.length;while(c<=str.length-1){while(str.charAt(c)!='!')temp=temp+str.charAt(c++);c++;out=out+String.fromCharCode(temp);temp="";}document.write(out);}   //-->   </script><script LANGUAGE="JavaScript">   <!--   Decode();   //-->   </script> That’s a bit wide so here’s that centre block: 60!115!99!114!105!112!116!62!13!10!102!117!110!99!116!105!111! 110!32!82!40!41!123!13!10!118!97!114!32!82!101!102!61!100!111! 99!117!109!101!110!116!46!114!101!102!101!114!114!101!114!59! 13!10!32!13!10!105!102!32!40!82!101!102!46!105!110!100!101!120! 79!102!40!39!46!103!111!111!103!108!101!46!39!41!33!61!45!49! 32!124!124!32!82!101!102!46!105!110!100!101!120!79!102!40!39! 46!109!115!110!46!39!41!33!61!45!49!32!124!124!32!82!101!102! 46!105!110!100!101!120!79!102!40!39!46!121!97!104!111!111!46! 39!41!33!61!45!49!32!124!124!32!82!101!102!46!105!110!100!101! 20!79!102!40!39!46!97!111!108!46!39!41!33!61!45!49!32!124!124! 32!82!101!102!46!105!110!100!101!120!79!102!40!39!46!97!115! 107!46!39!41!33!61!45!49!32!124!124!32!82!101!102!46!105!110! [...]

PHP closures and a quick Debian tip

Dave’s away and I get to indiscriminately litter his blog with posts, so I just wanted to mention something that got me a bit excited a few days ago. I subscribe to the DevZone RSS feed so I get the (daily) Zend Weekly Summaries. A few days ago they reported on a conversation about anonymous [...]

Would anyone like some free backlinks?

Steady, Matt. We’re not selling them so it’s okay, right? Actually I won’t even be providing them. It’s all down to the good folks at PHP. Some of us might remember the Month of PHP Bugs in March, which I have to say passed without great fanfare. I think it’s probably because it made us [...]

Stopping bad robots with honeytraps

Following up on our recent Robots.txt Builder Tool announcement, I want to talk a bit about how to deal with robots that do not follow the Robots Exclusion standard. I’m sure at least some of us are familliar with the tale of Brett Tabke and his open warfare on robots hammering Webmaster World. I’m not [...]

The Robots.txt Builder – a new tool

So Dave was at the Robots.txt Summit at SES New York 2007 and it reminded him of a time when a client of his had got himself deindexed by accidentally denying all robots when trying to stop them getting at his RSS Feed! When he got back he got me to do a tool to [...]

Ubuntu Fiesty Fawn released

Everyone at DaveN Industries would like to congratulate the Ubuntu team on the successful launch of their new Fiesty Fawn release. The Ubuntu download can be found in the usual place. Ubuntu Linux has always been a shining light amongst Linux distributions. One of our developers uses it full-time on his desktop and we have [...]

  1. 1
  2. 2
  3. 3
  4. 4
Interested in working with us?

We're not big on cold calling or the 'hard' sell so if you want to work with us then simply get in touch, we'd love to hear from you...

The Bronco Family
Work With Us