Monthly Archive for July, 2006

Getting with the mod_rewrite voodoo

I’ve been working on a fairly large product site in two languages lately, and am using Apache mod_rewrite to do the url mapping, so that things look nice and pretty like, instead of the ugly query strings we’re not supposed to see in the Web 2.0 world (IMHO, somtimes I think query strings would be easier mind ‘cos there’s less to configure).

Anyhoo, I thought I’d post the mod_rewrite voodoo here for the greater goodness of mankind, and wait for people to shoot me down so that I can learn more from it ;-)

Here you go - download if you want it - all purty simple and straightforward:
(PS - each line should be on one line, so if it wraps for you, copy and paste and make sure it’s one one line when you use it)

# mod_rewrite in use
RewriteEngine On

# This needs to be set to allow URL manipulation on my server - setup on local dev server in httpd.conf
Options +FollowSymlinks

# Set the base URL
RewriteBase /

# we don’t want rules to apply to this directory
RewriteRule ^your-dir-name/.*$ - [L]

### set all page requests to go to www.domain.com instead of domain.com
#RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
#RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

########## Begin Standard SEF Section
RewriteRule ^profiles/([^/\.]+)/?$ profile.php?page=$1 [L]

# categories
RewriteRule ^([^/\.]+)/?$ /view_category.php?cat_url=$1 [QSA,L]

# subcategories
RewriteRule ^([^/\.]+)/([^/\.]+)/?$ /view_subcategory.php?cat_url=$1&subcat_url=$2 [QSA,L]

## detailpages, second sends a state of the product detail page
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /view_product_detail.php?cat_url=$1&subcat_url=$2&product_url=$3 [QSA,L]
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /view_product_detail.php?cat_url=$1&subcat_url=$2&product_url=$3&state=$4 [QSA,L]

#
########## End Standard SEF Section

########## Error documents
ErrorDocument 404 /error.php

I’ll leave you with some cool quotes from the real guru’s:
The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail.” — Brian Behlendorf, Apache Group

Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo.” — Brian Moore

Web app laser focus

Today was a good day - we sat down and really thrashed out the user case and benefits thereof, for the app we’re building, over a bit of lunch. One of the things that came up continually was the importance of staying focussed on the task at hand, which is “the credit card test“. We’ve all worked for many years in this industry, and all worked in all sorts of environments, but the one thing that is common to all of them is the desire to continually add new features and new functionality, either at our own behest, or at the clients request. The upside in the service model is that since your time is money, you earn more money. There doesn’t seem to be much of a downside as long as you deliver what you promise, apart from stress of course ;-)

In the product side of things, however, not having a laser focus is both deadly and foolish. So what we’ve done is create a list of “nice to have’s” which we’ll keep track of and add to as we grow into our app, but for now, they’re just going to slow us down and add more work, more time and more frustration.

So we’ve really cut back on extraneous features, nailing things down to the absolute essentials - we’re not making any assumptions about what users will want or need, and we’re not going to deviate from that. We have a core offering and that simplicity is what will allow me to go to sleep tonight a happy man - safe in the knowledge that we can build up rather than have to build sideways and backwards.

My current other frustration is that things in the US seem to be blowing up, literally every day. I only have to sync my feeds in the morning to get at least 1 to 3 posts about this or that company getting funding, or releasing a new app.

OK, I’m not in the US and I’m not in the business of creating an unsustainable venture, but I am in the business of siezing on opportunities, and it just seems like the eternal adage of “it will always take longer than you think to get it done” won’t go away - balancing client work with web app development (even when you’re essentially directing, there is loads of business and marketing stuff to think about) doesn’t make for lots of time to try out new ideas.

So, the upshot is that the web app is progressing thanks to some very cool people who are working on it, but the downside is that I’m pushing back my social and relaxation time to get things done. It’s a short term fix, but will hopefully have long term benefits [I'd love to talk to you if you are in a similiar situation or have experienced this situation before] thanks to staying true to the absolute laser focus and staying true to our ideals of providing value over gimmickry.

CitySafe are looking for an Account Manager with web app experience

CitySafe are hiring::

Account Manager
We need a well presented, confident, intelligent and dedicated account handler with a minimum of three years agency experience in a professional environment.
* You must be personal and adaptable, and have a natural ability to apply new ideas in varied business environments, and use them to their full potential
* You must be able to work with FTSE 100 corporations and large public organisations
* You are completely trustworthy (we will be looking to obtain security clearance for successful applicants)
* You have an understanding of web-based applications or would like to move into this area of expertise

Any experience of the following would be beneficial

* business continuity
* contingency planning
* web application development
* SugarCRM

Salary: circa £22k / yr pro rata + commisson

Full time position, but we would consider a part-time role for the right candidate.