Wednesday, January 5, 2011

Major Smart Sites Update

Over the last few days, Smart Sites has been updated several hundred times with new features and bug fixes.  Most recently, I repaired a very serious problem regarding opening a user's site.  The sites are each saved in a sub-folder inside the site's root, however they are using a custom-built Apache server mod to display pages without confusing, complicated addresses.  The problem was that when you entered a site's address, if you did not include a slash at the end, the site would not load, and would give you a Bad Request error.  This is obviously a problem as very few users would think to add a slash to the end without being told to.  The final solution took several hours of messing around, sometimes messing up the entire site, to get working.  This is the solved mod:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://www.smartsites.us/$1/ [L,R=301]

Nice, huh?  That was incredibly complicated, I really don't quite understand it entirely myself, but it works absolutely perfectly, loading files exactly the way they are intended, without giving any unnecessary data in the address.


A few other things I've been working on with this are mobile access, themes, page builder updates, security patches, and performance upgrades.  The mobile access has been built to allow every site's page to retain all of the content and features that the original page had, but make it all in a mobile formatted view, while keeping the site's theme as well.  It also has a very limited Smart Sites account editor and database viewer for mobile devices.  I've also been doing quite a bit of work on themes, making each one unique, attractive, and very cross-compatible.  The builder has been updated to allow you to save the page you are editing without having to reload the entire page and editor, instead saving in the background with no noticeable page change for the user.