Skip to main content

Posts

Showing posts from September, 2010

Simple HTTP Redirect with Querystring in IIS7

HTTP Redirect seems simple enough. Always was in IIS6 and in IIS7 there's even a button labeled HTTP Redirect that promises relative redirects.  It looks like it'll be as easy Apache finally.  That is until you try to redirect a querystring.  Then everything bombs. Turns out it still is relatively easy, except you have to know that Microsoft changed $S$Q to $V$Q. Why? $Ss and $Gs I suspect. And How. In our example we'll redirect all pages under http://olddomain.com/content to http://mydomain.com/content. Pick the virtual directory you want to redirect. e.g. http://olddomain.com/content Click HTTP Redirect under IIS in the IIS management console. In the HTTP Redirect Dialog: Check Redirect requests to this destination Enter your new path ending with $V$Q.  e.g. http://mydomain.com$V$Q Counter-intuitively check Redirect all request to exact destination (instead of relative destination) Choose the appropriate Status Code (Permanent or Temporary)

SEO is officially dead

Yes, I know we're all tired of hearing that some technology is dead. Wired was wrong about the web dying in 1997 and 2010. Truth be told Wired isn't exactly good at identifying mortality. Phone calls aren't dead, the desktop isn't dead, cyberspace isn't dead, drm isn't dead, wifi isn't dead, guitar hero isn't dead and DRM isn't dead, yet (though Zuckerman is trying his best). Well, they were right about the floppy disk. Wait. That wasn't my point. My point was that SEO is *actually* dead. Here's why. Several minutes ago I google "fckeditor background marinelli". I find a solution that works . Using it I figure out a better way. I blog it . I hit the back button to review the search results again. My blog entry (I just typed) is result six. http://lmgtfy.com/?q=fckeditor+background+marinelli SEO is dead. Long live content. Thank you Google Instant.

Theming fckeditor to work with Marinelli Drupal Theme

Marinelli, a nearly flawless Drupal theme has one major flaw. It is not optimized to work with the fckeditor WYSIWYG editor. There are others as well. Some googling located some good tips for configuring modules/fckeditor/fckeditor.config.js to work with Marinelli on http://drupal.fckeditor.net/tricks . This solution is good, but it doesn't work well in multi-site situation or if more than one theme is enabled. Here is a simpler solution: Go to admin/settings/fckeditor and select "edit" next to the profile you want to fix. Make sure under "Style and template files" your Editor CSS is set to "Use theme CSS" Under "Advanced Options", find "Custom javascript configuration" and paste the following: FCKConfig.BodyId = "primary"; FCKConfig.BodyClass = "singlepage"; FCKConfig.EditorAreaStyles = "body{background:#FFFFFF;text-align:left;font-size:0.8em}"; Spank "Save" If you are running

Using Drupal Feeds Module to Import Content from MS Access

Feeds works brilliantly, but there is a couple weird gotchas when working from MS Access to Drupal that are worth documenting: Seems self-explanatory, but since you are importing as .txt or .csv make sure you remove all carriage returns .  In MS Access this involves writing an update query and doing a replace on all Chr(10) and Chr(13).  e.g. Replace(Replace([myfield],Chr(10),"<br />"),Chr(13),"<br />")   Although CCK Date fields import perfectly as MS Access dates, published dates do not.  This is because the published field in Drupal is a Unix Timestamp which is a quite different than Access dates.  The easiest way I know to fix this is to export your data to Excel and then use the Excel integer date value to convert to a Unix Timestamp. We've all seen this right?  That really long integer you see when you misformat a date?  Anyway, to fix you need to first account for the difference between the start dates of the two time systems and then accou

Finding and Replacing Special Characters in MS Access

Most special characters like Tabs and Line Break and Carriage Returns can be found and replaced in MS Access by using the character codes.  But you can't use the find and replace dialog. Instead, author an update query and enter the following to remove tabs: Replace([myfield],Chr(9),"") If removing line breaks you need to replace both the line break and carriage return character: Replace(Replace([myfield],Chr(10),""),Chr(13),"") If editing for HTML you'd edit this to the following for HTML line breaks: Replace(Replace([myfield],Chr(10),"<br />"),Chr(13),"<br />") For other characters, look up the ascii character code . (use the numbers in the "Dec" column in the tables)

MS Access Truncating Exports of Memo Fields at 512 Characters

Recently I was surprised to find that exports of Memo fields to csv and txt truncate at 512 characters. Thankfully, there is an easy, albeit poorly documented hack.  In the export wizard set "Text Qualifier" to "{none}"

Microsoft.Jet.OLEDB.4.0 on a 64bit OS with IIS7

When attempting to run Microsoft Jet Connection to MS Access Databases on a 64bit Machine you will get the following unhelpful error: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. Googling will point you on a couple crazy paths involving recompiling your application in 32 bit mode. The solution isn't that complicated if you are using IIS7. In IIS7 right-click on your application pool and choose "Advanced Settings" In the dialog that opens, set "Enable 32-bit Applications" to "True". There I fixed it.