duncan1 (sent by Nabble.com) wrote:
> I have got the friendlyUrls set up on a couple of websites i have been
> developing.  I was wondering if anybody has managed to get friendlyUrls
> functionality to work without having to use the "/go/" directory?
> 
> It's just that the clients are not happy with having "go" in their urls on
> publicity.

I've noticed a fair amount of chatter on this topic of Friendly URLs.

Firstly, clients that don't want the /go/ typically don't want a URL 
like /index.cfm/products/t-shirt either. In fact the latter is just bad 
in my book full stop.

The reality is clients who demand things like this rarely have an 
understanding of how content management systems work.  You either have 
lots of physical files or you have url parameters, its that easy.  Your 
solution is flat or dynamic.  Dynamic urls need some type of parameter.

If you have URL parameters (which is the norm for any dynamic solution), 
you can then attempt disguise the fact with "friendly urls".  FarCry 
friendly urls are like any other system based on rewrites -- you need to 
be able to write rules that the re-write engine can understand so that 
it passes valid requests to some central invocation code (in FarCry's 
case its go.cfm) along with something in the URL that can marry up to 
the underlying parameters it expects.

A unique element in the URL is the easiest way to do this.  For example, 
"/go".  But it can be anything really.. even just "/".  The problem is 
that not everything should go through go.cfm.  For example, images, 
files, pages that have no friendly url, etc.  If you want a wildcard 
like "/", then you need to write a whole bank of exceptions such as "if 
/images then don't rewrite" and so on.

Every time you add something to your solution you need to be thinking if 
you need to add another exception rule to your rewrite engine.  The more 
complex your application the more rewrites. For an "out of the box" 
solution, that provides very clean friendly urls for any content type 
(including your own custom content types) and only requiring a single 
rewrite for /go -- it all seems like a pretty good compromise to me ;)

That said, there is no reason why you couldn't just add to your servers 
rewrite rules.  For example, you could have a rewrite for 
www.myplace.com/news that redirects only for news content..  for dynamic 
content (ie. not tree based content) FarCry uses something like 
/xx/type-displayname/label where xx is the Friendly URL prefix 
(typically go).  This is great because you can add as many content types 
as you like and they all can have friendly urls based off the one 
rewrite rule -- but its *not* required.

And you can override the way FarCry generates the friendly URL for any 
content type so that it marries up with your new fangled rewrite rules.

However, if all your clients really want is the ability to advertise a 
URL like www.myplace.com/specialoffer then why not just add a rewrite 
rule just for that campaign and forget modifying FarCry altogether?

Hope that helps someone,

-- geoff
http://www.daemon.com.au/
-- 
Message protected by MailGuard: e-mail anti-virus, anti-spam and content 
filtering.
http://www.mailguard.com.au/mg



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/farcry-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to