RE: CF_FakeURL problems

2002-03-08 Thread Ben Forta

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  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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CF_FakeURL problems

2002-03-08 Thread Steve Oliver

I haven't had a chance to look at the FakeURL tag, but I made something
like that quite a while back, and had the same problem.  That was my
solutions as well, I put a request variable in the application called
#Request.urlPath#

But here is what my "FakeURL" tag looked like:


//first get everything after the script file
qstring = replace(CGI.path_info,CGI.script_name,"");

//next loop through each variable and set them accordingly
for(i=1; listlen(qstring,"/") GTE i; i=i+1){
if(i MOD 2){
qstringvariable = listgetat(qstring,i,"/");
}else{
"URL.#qstringvariable#" = listgetat(qstring,i,"/");
}
}


_
steve oliver
senior internet developer
atnet solutions, inc.
http://www.atnetsolutions.com


-Original Message-
From: Roger B. [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 08, 2002 5:01 AM
To: CF-Talk
Subject: Re: CF_FakeURL problems


On Fri, 8 Mar 2002 14:48:44 +0900, "list peters" <[EMAIL PROTECTED]>
wrote:

>find and replace hell now..
>basehref would work if it wasnt for those pesky mac os X IE browsers.

While you're doing that, take a minute to drop the following into your
application.cfm:

http://myabsolutepath.com/dir/";>

.and then replace your relative URLs with something like:



That way you'll never need to do a global s&r again... changing the
path of all your links will be as simple as changing one line of code.

--

__
Why Share?
  Dedicated Win 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=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CF_FakeURL problems

2002-03-08 Thread Roger B .

On Fri, 8 Mar 2002 14:48:44 +0900, "list peters" <[EMAIL PROTECTED]>
wrote:

>find and replace hell now..
>basehref would work if it wasnt for those pesky mac os X IE browsers.

While you're doing that, take a minute to drop the following into your
application.cfm:

http://myabsolutepath.com/dir/";>

..and then replace your relative URLs with something like:



That way you'll never need to do a global s&r again... changing the
path of all your links will be as simple as changing one line of code.

--
__
Why Share?
  Dedicated Win 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=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CF_FakeURL problems

2002-03-07 Thread list peters

hi

damn..

find and replace hell now..
basehref would work if it wasnt for those pesky mac os X IE browsers.

thanks for your responses on this issue.

Ben Forta, and everyone considering useing this method, you should probably
update the article on fakeurl to let people know that they need to use
absolute url or they will run into problems.

thanks
chad


> I had exactly the same problem, and solved it either with a basehref or
> going to a full url.  Fortunately for various reasons I was already
> using full urls in most places so it wasn't so bad.
>
> --Matt Robertson--
> MSB Designs, Inc.
> http://mysecretbase.com
>
>
>
> -Original Message-
> From: list peters [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 8: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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CF_FakeURL problems

2002-03-07 Thread Matt Robertson

I had exactly the same problem, and solved it either with a basehref or
going to a full url.  Fortunately for various reasons I was already
using full urls in most places so it wasn't so bad.

--Matt Robertson--
MSB Designs, Inc.
http://mysecretbase.com



-Original Message-
From: list peters [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 07, 2002 8: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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CF_FakeURL problems

2002-03-07 Thread Paul Giesenhagen

We ran into the problem here and there, but most of our links already wer
e
Absolute url's so it worked out great for us ... not too big of a pain.

Time for some search and replace :)

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector - Commerce Builder


> hi,
>
> I have implemented something like cf_fakeUrl before but i came across s
ome
> 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 wher
e
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 i
n
> fakeurl that solves this problem?
>
> Do i just have to convert everything to absolute url's?
>
> thanks
> chad
>
> 
__
Why Share?
  Dedicated Win 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=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



CF_FakeURL problems

2002-03-07 Thread list peters

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

__
Why Share?
  Dedicated Win 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=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists