March 11, 2010

Pages


Search Site


Topics



Archives

Entries for month: November 2007

Your first regular expression (RE)

November 20 2007 by admin
To really understand ISAPI as opposed to Mod_Rewrite you need to know that all RewriteRule lines start with the ^ (caret). In regular expressions, the caret matches at the start of the string the regex pattern is applied to and matches a position rather than a character. Most regex flavors have an option to make the caret match after line breaks (i.e. at the start of a line in a file) as well. So, although I can find no documentation on the subject I assume the caret takes the place of the standard URL (http://foo.bar.com) up to but not including the first forward slash after the URL. I do know for certain that if you don't use it your INI file is practically worthless. In order to really understand ISAPI, you need to start using regular expressions. If you are completely in the dark about regular expressions, I suggest reading up on the subject before you attempt to learn how to use ISAPI, but I will give a short intro to Regular Expressions here: http://www.regular-expressions.info/reference.html. A Regular Expressions is a sort of extremely flexible wildcard search that has its own set of symbols for matching pretty much any string. A basic wildcard search would be something like this: *.html which would find any file that ends with .html. Regular expressions do the same sort of thing, but as I said, are much more flexible. The same search with regex would look like this: .*\.html$ In the regex above, the . (dot) matches any single character, the * (asterisk) matches 0 or more of the preceding character, since we are looking for a literal dot, the . Before html must be escaped, and finally the $ (dollar sign) means the string should end. More Regex Rules abc would match abc a sequence of characters enclosed by brackets matches only one character: [abc] would match: 'a', 'b', or 'c' [a-z] matches any lowercase character from a - z [0-9] matches any number the '*' asterisk after any character will match 0 or more occurrences of the preceding character, while the '+' will match 1 or more. so [a-z]* will match 0 or more lowercase letters in a row. like :'aajfalsdjflasdjfalsdjfalsdfj' [a-zA-Z0-9_-]+ would match 1 or more of the characters shown within the brackets. The dot (.) is kind of like a wildcard and matches a single character, except line break characters. ISAPI also can leverage grouping in regular expressions. () parenthesis are used to define a group. Anything you put in a group goes into a variable. So if you had somthing like: /prod.asp?pid=6435&color=green&size=medium to this /products/6435/green/medium This is what you would use: RewriteRule ^products/([0-9]+)/([a-z]+)/([a-z]+)$ /prod.asp?pid=$1&color=$2&size=$3 As you can see there are 3 groups. 1. ([0-9]+) , ([a-z]+) , and ([a-z]+) these 3 are put into the variables: $1, $2, and $3 So to summarize, what you are doing with a ISAPI is asking your web server to check each url when it comes in, to see if it matches the pattern products/([0-9]+)/([a-z]+)/([a-z]+)$, then its going to get sent to /prod.asp?pid=$1&color=$2&size=$3 with the variables from the groups.

Posted in Ionic's Isapi Rewrite Filter for IIS | 1 comments

Dreamweaver Crash

November 16 2007 by admin
If you are like me, you run a number of applications at one time and have several client projects in development simultaneously Therefore, you might find it easier to place your system in standby when leaving your desk for the night rather than shutting down. In fact you might go weeks between restarts.

If that's you, and you use Dreamweaver CS3, you are about to find yourself in an unusual situation the next time you restart your system and open a file in Dreamweaver. When the mouse focuses on non-html code (php,cfm,jsp) Dreamweaver experiences a fatal error and crashes. the cause of this is because of some synchronization error that exists between the date that Europe goes on daylight savings and the date in which the United States does. So stop banging your head against the wall the fix is here.

Please fix this by
1. Closing Dreamweaver
2. Set your clock to the correct time if it isn't already so
3. delete WinFileCache*.dat from
C:\Documents and Settings\[Your username]\Application Data\Adobe\Dreamweaver 9\Configuration
4. Start Dreamweaver and use it as usually

Enjoy!

Posted in Adobe CS3 | 8 comments

Making MS IIS Act Like Apache

November 12 2007 by admin
Recently I was asked by a media company in Miami Florida to help rewrite URL strings using ISAPIRewite. I had some real difficulties in the past using ModRewrite on a Win 2K3 Enterprise box. So much so that the last time, I had to deferr to a company in Canada to bail me out. So I was a little nervous, but I learned a lot from that project and knew if an issue arose I had a Maple Leaf in my back pocket. One of the biggest sellers for this package is its price. Free! Just wander over to http://cheeso.members.winisp.net/IIRF.aspx and get a copy for yourself. As with all this type of software the doucmentation is sparse. So over the next couple of days, I'll show you how to take so typical ColdFusion URL strings and change them into something a little more SES(y). Install your code and we'll see you tomorrow.

Posted in Ionic's Isapi Rewrite Filter for IIS | 2 comments

AJAX mod for CFWebstore

November 11 2007 by admin
Our client came to us and asked us if we could make a Tell A Friend link on their product page which would be similar to Amazon's. So we gave it a look and produced a nifty little applications with some divs using the visiblity function and a simple proxy. This was done on a MX 6.1 system so we did not have the benefit of cfajaxproxy. See for yourself. Look for the Tell A Friend link near the lower left but above the footer and click it. Tell A Friend

Posted in CFWebstore Modifications in Action | 0 comments

Welcome to our new home and new blog.

November 10 2007 by admin
When I started Shared Dynamics seven years ago I never thought that my small company would ever leave the confines of the three rivers of Southwestern Pennsylvania. The market at that time was full of start-ups and the money flowed like the Ohio River. VCs and others looked toward Pittsburgh and the influences of Carnegie Mellon University to spur this "new economy." Then in 2001, long after the bubble burst elsewhere, it happened here. More accurately the economy of new technology shifted, quite abruptly, to biotechnology. All the ideas that once seemed great in ecommerce was tarnished and dirty. Companies with video game and sushi bar break rooms gave way to lab coats and electron microscopes. Most companies were closed and those who survived tightened the purse strings or were consumed by other companies. I switched jobs 6 times in 2 years and by June of 2003, I had had enough. It was time to turn my little side business into my job. Today Shared Dynamics has 30 full-time clients in 7 enconomic sectors. Our influence reaches from the United Kingdom westward to Los Angeles California. We have become the leader in custom modifications for CFWebstore and offer full service ColdFusion 8 hosting packages for as little as $16.99 per month. I've taken on 2 new ColdFusion Developers and a Microsoft SQL DBA. The office now finds itself in Chippewa Township in Beaver Falls PA where we are less than 30 minutes from Pittsburgh PA and the Youngstown OH area. We welcome you and look forward to doing business with you.

Posted in About Us | 2 comments