Wow, of all the columns and articles I have written this one has
generated the most e-mail and response. I guess folks want to hear about
this.

A few comments though ...

As several of you have noted, most newer (better) search engines do not
make the ridiculous assumption that pages that differ by query string
are one and the same.

But, some do, and thus the <CF_FakeURL> tag and column.

Yes, this does have an impact on relative URL's, as the browser is what
builds those, and it uses the path it sees to do so. (I have a follow-up
in next CFDJ explaining this, as so many asked about it).

The solution obviously is to use absolute paths. And there are a few
ways to do this:

1) You could just change the paths to absolute paths, I'd recommend
against this, as it means that if file locations change things will
break easily.

2) Use a CF variable for the "absolute" portion of the path, if things
change you just have one variable to change. 

3) This one is the most creative, but a little harder to implement,
build dynamic absolute paths. For example, have a Custom Tag take the
fake URL and return a variable that should be used as the prefix (it
could calculate it by looking at the appended fake portion, the template
name, and other information). Then use that variable in all paths - the
result is that you are using absolute paths which will make the browser
happy, but all paths are built dynamically at run time.

--- Ben



-----Original Message-----
From: list peters [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 07, 2002 11:22 PM
To: CF-Talk
Subject: CF_FakeURL problems


hi,

I have implemented something like cf_fakeUrl before but i came across
some problems.

*  The url string messed up relative links.  eg ../file.cfm doesnt work
because the url string is sometihng like /page.cfm/id/6/page/front/ so
./ would put me in directory that doesnt exist!

Also, it caused the same problems using relative links to images.

I fixed this problem by using the base tag to let the browser know where
we were.

Unfortunately, on mac os X IE the browser didnt seem to understand the
base tag and users reported broken images, bad links, etc.

My solution was to use absolute url's for images and links.

This is easy, but my *whole* site is using relative links, and it would
be a pain to convert everything to absolute links.

My question is, have people had these problems, or is there something in
fakeurl that solves this problem?

Do i just have to convert everything to absolute url's?

thanks
chad


______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to