Re: How to get directory from full URL?

2002-10-02 Thread Stephen Moretti

> I should probably have a UDF like ListRestReverse() to do that, 'cause
I've
> done it in a number of places... but I don't. :P There might be one on
> cflib.org tho... I haven't checked.
>

Why???  I'm so confused!!!
Why on earth, how on earth,  do so many people come up with a double
negative for a simple listdeleteat



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



Re: How to get directory from full URL?

2002-10-01 Thread S . Isaac Dealey

I should probably have a UDF like ListRestReverse() to do that, 'cause I've
done it in a number of places... but I don't. :P There might be one on
cflib.org tho... I haven't checked.

Isaac
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046

> Mr. Dealey gets a cookie!

> Thanks!  I never even thought about using reverse()
> twice...

> Pete

> - Original Message -
> From: "S. Isaac Dealey" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, October 01, 2002 11:39 AM
> Subject: Re: How to get directory from full URL?


>> > I am trying to get a fully resolved directory (i.e.
>> > http://www.mysite.com/this/is/a/directory/) from a
>> > fully resolved URL
>> > (i.e. http://www.mysite.com/this/is/a/directory/and_thi
>> > s_is_a_file.cfm)
>> > that I am passing in, but I am having difficulty in
>> > finding a simple and
>> > elegant way to do so.
>>
>> > I looked on cflib.org and didn't find any UDF's
>> > there...does anyone have
> a
>> > solution for this?  Straight code or a UDF would be
>> > great.
>>
>> If you just want to remove the file name:
>>
>> Reverse(ListRest(Reverse(fullurl),"/"))
>>
>> Or
>>
>> REReplaceNoCase(fullurl,"^(.*)/.*$","\1")
>>
>> hth
>>
>> S. Isaac Dealey
>> Certified Advanced ColdFusion 5 Developer
>>
>> www.turnkey.to
>> 954-776-0046
>>
> __
> 
> Your ad could be here. Monies from ads go to support these
> lists and provide more resources for the community.
> http://www.fusionauthority.com/ads.cfm
> 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



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: How to get directory from full URL?

2002-10-01 Thread Subramanian, Samy

#GetDirectoryFromPath(url)# should bring the directory

-Original Message-
From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 2:37 PM
To: CF-Talk
Subject: RE: How to get directory from full URL?


Ahh... PATH_TRANSLATED.

You're right (not that you need me to tell you this), PATH_TRANSLATED will
use backslashes.  Wasn't the original question about a URL, tho?

Confused in CF-Talk

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -Original Message-
> From: Larry Juncker [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 2:14 PM
> To: CF-Talk
> Subject: RE: How to get directory from full URL?
>
>
> And here is my example, based on the question at hand:
>
> Path_Translated = F:\Websites\4ComPart\IMT_GetsResults\getReturns.cfm
> Reverse(Path_Translated) =
> mfc.snruteRteg\stluseRsteG_TMI\traPmoC4\setisbeW\:F
> Reverse(ListRest(Reverse(PATH_TRANSLATED),"\\")) =
> F:\Websites\4ComPart\IMT_GetsResults
>
> Larry Juncker
> Senior Cold fusion Developer
> Heartland Communications Group, Inc.
> [EMAIL PROTECTED]
> (515) 574-2122
>
> CONFIDENTIALITY NOTICE
> The information contained in this e-mail is intended only for the
> use of the
> individual or entity to which it is addressed.  This e-mail may contain
> information that is privileged, confidential and/or personal.  If
> the reader
> of this message is not the intended recipient (or the employee or agent
> responsible to deliver it to the intended recipient), you are hereby
> notified that any dissemination, distribution, or copying of this
> communication is prohibited.
>
> If you have received this communication in error, please notify us at the
> e-mail listed above.
>
> -Original Message-----
> From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 12:56 PM
> To: CF-Talk
> Subject: RE: How to get directory from full URL?
>
>
> Pardon?  Reversed the delimiter?
>
> Reverse simply changes the order of the characters.  It doesn't
> hold them up
> to a mirror and get new characters.
>
> Reverse("/") = /
> Reverse("\") = \
> Reverse("/\") = \/
> Reverse("\/") = /\
>
> --
> Mosh Teitelbaum
> evoch, LLC
> Tel: (301) 625-9191
> Fax: (301) 933-3651
> Email: [EMAIL PROTECTED]
> WWW: http://www.evoch.com/
>
>
> > -Original Message-
> > From: Larry Juncker [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 01, 2002 1:34 PM
> > To: CF-Talk
> > Subject: RE: How to get directory from full URL?
> >
> >
> > Actually, the way that works with testing is:
> >
> > #Reverse(ListRest(Reverse(PATH_TRANSLATED),"\\"))#
> >
> > You have reversed the string, therefore, you have reversed the
> > delimiter.
> >
> > Just my two cents...
> >
> > Larry Juncker
> > Senior Cold fusion Developer
> > Heartland Communications Group, Inc.
> > [EMAIL PROTECTED]
> > (515) 574-2122
> >
> > CONFIDENTIALITY NOTICE
> > The information contained in this e-mail is intended only for the
> > use of the
> > individual or entity to which it is addressed.  This e-mail may contain
> > information that is privileged, confidential and/or personal.  If
> > the reader
> > of this message is not the intended recipient (or the employee or agent
> > responsible to deliver it to the intended recipient), you are hereby
> > notified that any dissemination, distribution, or copying of this
> > communication is prohibited.
> >
> > If you have received this communication in error, please notify
> us at the
> > e-mail listed above.
> >
> > -Original Message-
> > From: Kevin Graeme [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 01, 2002 11:34 AM
> > To: CF-Talk
> > Subject: RE: How to get directory from full URL?
> >
> >
> > > Reverse(ListRest(Reverse(fullurl),"/"))
> >
> > Oooh, that's just durn purty.
> >
> > Kevin Graeme
> >
> >
> >
>
> 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: How to get directory from full URL?

2002-10-01 Thread Mosh Teitelbaum

Ahh... PATH_TRANSLATED.

You're right (not that you need me to tell you this), PATH_TRANSLATED will
use backslashes.  Wasn't the original question about a URL, tho?

Confused in CF-Talk

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -Original Message-
> From: Larry Juncker [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 2:14 PM
> To: CF-Talk
> Subject: RE: How to get directory from full URL?
>
>
> And here is my example, based on the question at hand:
>
> Path_Translated = F:\Websites\4ComPart\IMT_GetsResults\getReturns.cfm
> Reverse(Path_Translated) =
> mfc.snruteRteg\stluseRsteG_TMI\traPmoC4\setisbeW\:F
> Reverse(ListRest(Reverse(PATH_TRANSLATED),"\\")) =
> F:\Websites\4ComPart\IMT_GetsResults
>
> Larry Juncker
> Senior Cold fusion Developer
> Heartland Communications Group, Inc.
> [EMAIL PROTECTED]
> (515) 574-2122
>
> CONFIDENTIALITY NOTICE
> The information contained in this e-mail is intended only for the
> use of the
> individual or entity to which it is addressed.  This e-mail may contain
> information that is privileged, confidential and/or personal.  If
> the reader
> of this message is not the intended recipient (or the employee or agent
> responsible to deliver it to the intended recipient), you are hereby
> notified that any dissemination, distribution, or copying of this
> communication is prohibited.
>
> If you have received this communication in error, please notify us at the
> e-mail listed above.
>
> -Original Message-----
> From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 12:56 PM
> To: CF-Talk
> Subject: RE: How to get directory from full URL?
>
>
> Pardon?  Reversed the delimiter?
>
> Reverse simply changes the order of the characters.  It doesn't
> hold them up
> to a mirror and get new characters.
>
> Reverse("/") = /
> Reverse("\") = \
> Reverse("/\") = \/
> Reverse("\/") = /\
>
> --
> Mosh Teitelbaum
> evoch, LLC
> Tel: (301) 625-9191
> Fax: (301) 933-3651
> Email: [EMAIL PROTECTED]
> WWW: http://www.evoch.com/
>
>
> > -Original Message-
> > From: Larry Juncker [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 01, 2002 1:34 PM
> > To: CF-Talk
> > Subject: RE: How to get directory from full URL?
> >
> >
> > Actually, the way that works with testing is:
> >
> > #Reverse(ListRest(Reverse(PATH_TRANSLATED),"\\"))#
> >
> > You have reversed the string, therefore, you have reversed the
> > delimiter.
> >
> > Just my two cents...
> >
> > Larry Juncker
> > Senior Cold fusion Developer
> > Heartland Communications Group, Inc.
> > [EMAIL PROTECTED]
> > (515) 574-2122
> >
> > CONFIDENTIALITY NOTICE
> > The information contained in this e-mail is intended only for the
> > use of the
> > individual or entity to which it is addressed.  This e-mail may contain
> > information that is privileged, confidential and/or personal.  If
> > the reader
> > of this message is not the intended recipient (or the employee or agent
> > responsible to deliver it to the intended recipient), you are hereby
> > notified that any dissemination, distribution, or copying of this
> > communication is prohibited.
> >
> > If you have received this communication in error, please notify
> us at the
> > e-mail listed above.
> >
> > -Original Message-
> > From: Kevin Graeme [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 01, 2002 11:34 AM
> > To: CF-Talk
> > Subject: RE: How to get directory from full URL?
> >
> >
> > > Reverse(ListRest(Reverse(fullurl),"/"))
> >
> > Oooh, that's just durn purty.
> >
> > Kevin Graeme
> >
> >
> >
>
> 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: How to get directory from full URL?

2002-10-01 Thread Larry Juncker

And here is my example, based on the question at hand:

Path_Translated = F:\Websites\4ComPart\IMT_GetsResults\getReturns.cfm
Reverse(Path_Translated) =
mfc.snruteRteg\stluseRsteG_TMI\traPmoC4\setisbeW\:F
Reverse(ListRest(Reverse(PATH_TRANSLATED),"\\")) =
F:\Websites\4ComPart\IMT_GetsResults

Larry Juncker
Senior Cold fusion Developer
Heartland Communications Group, Inc.
[EMAIL PROTECTED]
(515) 574-2122

CONFIDENTIALITY NOTICE
The information contained in this e-mail is intended only for the use of the
individual or entity to which it is addressed.  This e-mail may contain
information that is privileged, confidential and/or personal.  If the reader
of this message is not the intended recipient (or the employee or agent
responsible to deliver it to the intended recipient), you are hereby
notified that any dissemination, distribution, or copying of this
communication is prohibited.

If you have received this communication in error, please notify us at the
e-mail listed above.

-Original Message-
From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 12:56 PM
To: CF-Talk
Subject: RE: How to get directory from full URL?


Pardon?  Reversed the delimiter?

Reverse simply changes the order of the characters.  It doesn't hold them up
to a mirror and get new characters.

Reverse("/") = /
Reverse("\") = \
Reverse("/\") = \/
Reverse("\/") = /\

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -Original Message-
> From: Larry Juncker [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 1:34 PM
> To: CF-Talk
> Subject: RE: How to get directory from full URL?
>
>
> Actually, the way that works with testing is:
>
> #Reverse(ListRest(Reverse(PATH_TRANSLATED),"\\"))#
>
> You have reversed the string, therefore, you have reversed the
> delimiter.
>
> Just my two cents...
>
> Larry Juncker
> Senior Cold fusion Developer
> Heartland Communications Group, Inc.
> [EMAIL PROTECTED]
> (515) 574-2122
>
> CONFIDENTIALITY NOTICE
> The information contained in this e-mail is intended only for the
> use of the
> individual or entity to which it is addressed.  This e-mail may contain
> information that is privileged, confidential and/or personal.  If
> the reader
> of this message is not the intended recipient (or the employee or agent
> responsible to deliver it to the intended recipient), you are hereby
> notified that any dissemination, distribution, or copying of this
> communication is prohibited.
>
> If you have received this communication in error, please notify us at the
> e-mail listed above.
>
> -----Original Message-
> From: Kevin Graeme [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 11:34 AM
> To: CF-Talk
> Subject: RE: How to get directory from full URL?
>
>
> > Reverse(ListRest(Reverse(fullurl),"/"))
>
> Oooh, that's just durn purty.
>
> Kevin Graeme
>
>
>

__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
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: How to get directory from full URL?

2002-10-01 Thread Mosh Teitelbaum

Pardon?  Reversed the delimiter?

Reverse simply changes the order of the characters.  It doesn't hold them up
to a mirror and get new characters.

Reverse("/") = /
Reverse("\") = \
Reverse("/\") = \/
Reverse("\/") = /\

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -Original Message-
> From: Larry Juncker [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 1:34 PM
> To: CF-Talk
> Subject: RE: How to get directory from full URL?
>
>
> Actually, the way that works with testing is:
>
> #Reverse(ListRest(Reverse(PATH_TRANSLATED),"\\"))#
>
> You have reversed the string, therefore, you have reversed the
> delimiter.
>
> Just my two cents...
>
> Larry Juncker
> Senior Cold fusion Developer
> Heartland Communications Group, Inc.
> [EMAIL PROTECTED]
> (515) 574-2122
>
> CONFIDENTIALITY NOTICE
> The information contained in this e-mail is intended only for the
> use of the
> individual or entity to which it is addressed.  This e-mail may contain
> information that is privileged, confidential and/or personal.  If
> the reader
> of this message is not the intended recipient (or the employee or agent
> responsible to deliver it to the intended recipient), you are hereby
> notified that any dissemination, distribution, or copying of this
> communication is prohibited.
>
> If you have received this communication in error, please notify us at the
> e-mail listed above.
>
> -----Original Message-
> From: Kevin Graeme [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 11:34 AM
> To: CF-Talk
> Subject: RE: How to get directory from full URL?
>
>
> > Reverse(ListRest(Reverse(fullurl),"/"))
>
> Oooh, that's just durn purty.
>
> Kevin Graeme
>
>
> 
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
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: How to get directory from full URL?

2002-10-01 Thread Larry Juncker

Actually, the way that works with testing is:

#Reverse(ListRest(Reverse(PATH_TRANSLATED),"\\"))#

You have reversed the string, therefore, you have reversed the
delimiter.

Just my two cents...

Larry Juncker
Senior Cold fusion Developer
Heartland Communications Group, Inc.
[EMAIL PROTECTED]
(515) 574-2122

CONFIDENTIALITY NOTICE
The information contained in this e-mail is intended only for the use of the
individual or entity to which it is addressed.  This e-mail may contain
information that is privileged, confidential and/or personal.  If the reader
of this message is not the intended recipient (or the employee or agent
responsible to deliver it to the intended recipient), you are hereby
notified that any dissemination, distribution, or copying of this
communication is prohibited.

If you have received this communication in error, please notify us at the
e-mail listed above.

-Original Message-
From: Kevin Graeme [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 11:34 AM
To: CF-Talk
Subject: RE: How to get directory from full URL?


> Reverse(ListRest(Reverse(fullurl),"/"))

Oooh, that's just durn purty.

Kevin Graeme


__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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: How to get directory from full URL?

2002-10-01 Thread Stephen Moretti

> > Reverse(ListRest(Reverse(fullurl),"/"))
>
> Oooh, that's just durn purty.
>

Double negative??  You're all sick and twisted individuals   ;o)
Why not just take the last item off the end of the list?
ListDeleteAt(fullurl,ListLen(fullurl,"/"),"/")

Having had a look through the various CF functions, if you're after a real
physical path and not just a chunk of the URL, then you're going to have to
know where the files are in relation to your 404 files.

Stephen


__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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: How to get directory from full URL?

2002-10-01 Thread Everett, Al

http://www.mysite.com/this/is/a/directory/and_this_is_a_fi
le.cfm">


> -Original Message-
> From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 11:33 AM
> To: CF-Talk
> Subject: How to get directory from full URL?
> 
> 
> I am trying to get a fully resolved directory (i.e. 
> http://www.mysite.com/this/is/a/directory/) from a fully 
> resolved URL (i.e. 
> http://www.mysite.com/this/is/a/directory/and_this_is_a_file.c
> fm) that I am passing in, but I am having difficulty in 
> finding a simple and elegant way to do so.
> 
> I looked on cflib.org and didn't find any UDF's there...does 
> anyone have a solution for this?  Straight code or a UDF 
> would be great.
__
Get the mailserver that powers this list at http://www.coolfusion.com
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: How to get directory from full URL?

2002-10-01 Thread Kevin Graeme

> Reverse(ListRest(Reverse(fullurl),"/"))

Oooh, that's just durn purty.

Kevin Graeme

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
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: How to get directory from full URL?

2002-10-01 Thread Pete Ruckelshaus

Mr. Dealey gets a cookie!

Thanks!  I never even thought about using reverse() twice...

Pete

- Original Message -
From: "S. Isaac Dealey" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, October 01, 2002 11:39 AM
Subject: Re: How to get directory from full URL?


> > I am trying to get a fully resolved directory (i.e.
> > http://www.mysite.com/this/is/a/directory/) from a fully resolved URL
> > (i.e. http://www.mysite.com/this/is/a/directory/and_this_is_a_file.cfm)
> > that I am passing in, but I am having difficulty in finding a simple and
> > elegant way to do so.
>
> > I looked on cflib.org and didn't find any UDF's there...does anyone have
a
> > solution for this?  Straight code or a UDF would be great.
>
> If you just want to remove the file name:
>
> Reverse(ListRest(Reverse(fullurl),"/"))
>
> Or
>
> REReplaceNoCase(fullurl,"^(.*)/.*$","\1")
>
> hth
>
> S. Isaac Dealey
> Certified Advanced ColdFusion 5 Developer
>
> www.turnkey.to
> 954-776-0046
> 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
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: How to get directory from full URL?

2002-10-01 Thread Bryan F. Hogan

You can use this

#Reverse(ListRest(Reverse(HTTP_REFERER),"/"))#/

-Original Message-
From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 12:05 PM
To: CF-Talk
Subject: Re: How to get directory from full URL?


It does and it doesn't.

The application I am working on is a databased 404 redirect system, and
getTemplatePath did not return any value since it was trying to get the path
of the 404 handler rather than the actual bad page (which I can get via the
CGI variables)..

Pete

- Original Message -
From: "Stephen Moretti" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, October 01, 2002 11:44 AM
Subject: Re: How to get directory from full URL?


> Check the CF Function list.
>
> getTemplatePath() will do what you want...
>
> Stephen
>
>
> - Original Message -
> From: "Pete Ruckelshaus" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, October 01, 2002 4:32 PM
> Subject: How to get directory from full URL?
>
>
> > I am trying to get a fully resolved directory (i.e.
> http://www.mysite.com/this/is/a/directory/) from a fully resolved URL
(i.e.
> http://www.mysite.com/this/is/a/directory/and_this_is_a_file.cfm) that I
am
> passing in, but I am having difficulty in finding a simple and elegant way
> to do so.
> >
> > I looked on cflib.org and didn't find any UDF's there...does anyone have
a
> solution for this?  Straight code or a UDF would be great.
> >
> > Thanks
> >
> > Pete
> >
> >
>

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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: How to get directory from full URL?

2002-10-01 Thread Pete Ruckelshaus

It does and it doesn't.

The application I am working on is a databased 404 redirect system, and
getTemplatePath did not return any value since it was trying to get the path
of the 404 handler rather than the actual bad page (which I can get via the
CGI variables)..

Pete

- Original Message -
From: "Stephen Moretti" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, October 01, 2002 11:44 AM
Subject: Re: How to get directory from full URL?


> Check the CF Function list.
>
> getTemplatePath() will do what you want...
>
> Stephen
>
>
> - Original Message -
> From: "Pete Ruckelshaus" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, October 01, 2002 4:32 PM
> Subject: How to get directory from full URL?
>
>
> > I am trying to get a fully resolved directory (i.e.
> http://www.mysite.com/this/is/a/directory/) from a fully resolved URL
(i.e.
> http://www.mysite.com/this/is/a/directory/and_this_is_a_file.cfm) that I
am
> passing in, but I am having difficulty in finding a simple and elegant way
> to do so.
> >
> > I looked on cflib.org and didn't find any UDF's there...does anyone have
a
> solution for this?  Straight code or a UDF would be great.
> >
> > Thanks
> >
> > Pete
> >
> >
> 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
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: How to get directory from full URL?

2002-10-01 Thread Stephen Moretti

Or if I've got the wrong end of the stick

thispath = ListDeleteAt(cgi.script_name,ListLen(cgi.script_name,"/"),"/");

Stephen
- Original Message -
From: "Pete Ruckelshaus" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, October 01, 2002 4:32 PM
Subject: How to get directory from full URL?


> I am trying to get a fully resolved directory (i.e.
http://www.mysite.com/this/is/a/directory/) from a fully resolved URL (i.e.
http://www.mysite.com/this/is/a/directory/and_this_is_a_file.cfm) that I am
passing in, but I am having difficulty in finding a simple and elegant way
to do so.
>
> I looked on cflib.org and didn't find any UDF's there...does anyone have a
solution for this?  Straight code or a UDF would be great.
>
> Thanks
>
> Pete
>
> 
__
Get the mailserver that powers this list at http://www.coolfusion.com
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: How to get directory from full URL?

2002-10-01 Thread Stephen Moretti

Check the CF Function list.

getTemplatePath() will do what you want...

Stephen


- Original Message -
From: "Pete Ruckelshaus" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, October 01, 2002 4:32 PM
Subject: How to get directory from full URL?


> I am trying to get a fully resolved directory (i.e.
http://www.mysite.com/this/is/a/directory/) from a fully resolved URL (i.e.
http://www.mysite.com/this/is/a/directory/and_this_is_a_file.cfm) that I am
passing in, but I am having difficulty in finding a simple and elegant way
to do so.
>
> I looked on cflib.org and didn't find any UDF's there...does anyone have a
solution for this?  Straight code or a UDF would be great.
>
> Thanks
>
> Pete
>
> 
__
Get the mailserver that powers this list at http://www.coolfusion.com
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: How to get directory from full URL?

2002-10-01 Thread S . Isaac Dealey

> I am trying to get a fully resolved directory (i.e.
> http://www.mysite.com/this/is/a/directory/) from a fully resolved URL
> (i.e. http://www.mysite.com/this/is/a/directory/and_this_is_a_file.cfm)
> that I am passing in, but I am having difficulty in finding a simple and
> elegant way to do so.

> I looked on cflib.org and didn't find any UDF's there...does anyone have a
> solution for this?  Straight code or a UDF would be great.

If you just want to remove the file name:

Reverse(ListRest(Reverse(fullurl),"/"))

Or

REReplaceNoCase(fullurl,"^(.*)/.*$","\1")

hth

S. Isaac Dealey
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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