[thelist] CF: cflocation/cfcookie workaround
rudy
r937 at interlog.com
Mon Nov 26 10:26:09 CST 2001
> CFLOCATE has a nasty habit of stripping everything out of
> the datastream before it does the relocation. I'm sure that is the
> intentional behavior so that nothing seems to happen on the clients
> browser to give away the relocation actually occurred.
hi joshua
can i ask a follow-on question?
first of all, it's cflocation, right? ;o)
okay, what did you mean by "nothing seems to happen on the clients browser
to give away the relocation actually occurred"?
here's a bit of background
i want my archived pages to have urls without query strings, so that they
will get individual listings in search engines
i do *not* have the luxury on my server to make my 404 page a cfm page,
consequently i cannot just use a generic 404 routine that would handle all
"unknown" urls, e.g. to translate a link like
http://rudy.ca/20010929.cfm
into what it really is,
http://rudy.ca/archive.cfm?archive=20010929
so instead, what i'm thinking of doing is putting a real page on the
server, called 20010929.cfm, and inside that page i will have just the
following code --
<CFSET page=LCase(CGI.SCRIPT_NAME)>
<CFSET pagename = Mid(page,2,FindNoCase(".cfm",page)-2)>
<CFLOCATION url="archive.cfm?archive=#pagename#">
when i tested this, the actual url in the browser's address bar changed,
and revealed the url with the query string... not that i have a problem
with that, but, in view of your comment, i guess the real url *is* revealed
my thinking here -- and if anybody can see any weaknesses, please jump
in -- is that all i have to do is keep ftping the same file over and over
to the server with a different name each time for each archive article...
sure, it populates a lot of files on the server, but each one is only 150
bytes
the only part i *haven't* figured out yet is whether the search engine
spiders, in attempting to index a page called foo.cfm, and ending up on a
page which is really archive.cfm?archive=foo, will index using the former
name or the latter... because if all engines used the latter (like google
does), i wouldn't even bother with the whole thing!
finally, what would happen to any cookie during the relocation? i'm not
writing a new one, so basically it's just left as is on the client's
machine, right?
rudy
More information about the thelist
mailing list