Re: URL Structure
You can replace url's on the fly, or resave it to the database with the following... You can also put a around the whole thing and do it for every record in the database SELECT PageDataField FROM tbl_gallery WHERE ID = http://"; , "http://phat-links.com/page.cfm?goto=","ALL";)#> #newPageContent# ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240202 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: URL Structure
Tuan, I believe the suggestion I made earlier would work for you. -mark -Original Message- From: Tuan Tran [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 2:15 PM To: CF-Talk Subject: Re: URL Structure I do already have a disclaimer page. Lets say I have a page called content.cfm and a page called disclaimer.cfm. The user will use a CMS tool to write the content for the content.cfm page. They have no control over the layout of the page (headers, navigation, footers, or anything like that). Using this tool, the user creates the content and creates any links. The user does NOT see any HTML at all. The CMS tool does everything for the user. Now when a user creates a link in content.cfm they prefix any link with http://mysitename.com/disclaimer.cfm?destination= For example a link a user might enter into the CMS tool might look like: http://mysitename.com/disclaimer.cfm?destination=http://someurlhere.com/disc laimer.cfm?destination=http://go.reuters.com/newsArticle.jhtml?type=healthNe ws&storyID=12037965&src=eDialog/GetContent So the disclaimer page is displayed first before redirecting the user to the intended link. What my disclaimer.cfm page does now is extracts the value from the destination url variable and a javascript then redirects the page to that value. But it doesn't work when there are multiple URL parameters in the destination URL, like in the Reuter link above. I'm trying to find a solution that would allow the disclaimer.cfm page to do all the work of extracting and creating the redirect link correctly without having the user do anything different on the content.cfm page. I hope this clears up my problem. I really don't know how else to explain it. > So I'm basically trying to find a way to have the disclaimer page > extract the complete URL from the referring page (which is the page > the content editor makes). > > > Do you have this disclaimer page? Or are you asking how to substitute > a disclaimer page when a user clicks on a link in content made by your > CMS? > > I understood from your first post, that you had the disclaimer page > working, but that when users clicked on the link in it, the did not > get to some pages properly if the relocation link had url parameters. > Is this correct? Do you have a page that makes these links for you? > > http://someurlhere.com/disclaimer.cfm?destination=http://go.reuters. > com/newsArticle. > jhtml?type=healthNews&storyID=12037965&src=eDialog/GetContent > > Or are you asking for help on how to create these kinds of links in > the first place. > > > > > -- > Ian Skinner > Web Programmer > BloodSource > www.BloodSource.org > Sacramento, CA > > - > | 1 | | > - Binary Soduko > | | | > - > > "C code. C code run. Run code run. Please!" > - Cynthia Dunning > > Confidentiality Notice: This message including any attachments is for > the sole use of the intended > recipient(s) and may contain confidential and privileged information. > Any unauthorized review, use, disclosure or distribution is > prohibited. If you are not the intended recipient, please contact the > sender and delete any copies of this message. > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240164 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: URL Structure
I do already have a disclaimer page. Lets say I have a page called content.cfm and a page called disclaimer.cfm. The user will use a CMS tool to write the content for the content.cfm page. They have no control over the layout of the page (headers, navigation, footers, or anything like that). Using this tool, the user creates the content and creates any links. The user does NOT see any HTML at all. The CMS tool does everything for the user. Now when a user creates a link in content.cfm they prefix any link with http://mysitename.com/disclaimer.cfm?destination= For example a link a user might enter into the CMS tool might look like: http://mysitename.com/disclaimer.cfm?destination=http://someurlhere.com/disclaimer.cfm?destination=http://go.reuters.com/newsArticle.jhtml?type=healthNews&storyID=12037965&src=eDialog/GetContent So the disclaimer page is displayed first before redirecting the user to the intended link. What my disclaimer.cfm page does now is extracts the value from the destination url variable and a javascript then redirects the page to that value. But it doesn't work when there are multiple URL parameters in the destination URL, like in the Reuter link above. I'm trying to find a solution that would allow the disclaimer.cfm page to do all the work of extracting and creating the redirect link correctly without having the user do anything different on the content.cfm page. I hope this clears up my problem. I really don't know how else to explain it. > So I'm basically trying to find a way to have the disclaimer page > extract the complete URL from the referring page (which is the page > the content editor makes). > > > Do you have this disclaimer page? Or are you asking how to substitute > a disclaimer page when a user clicks on a link in content made by your > CMS? > > I understood from your first post, that you had the disclaimer page > working, but that when users clicked on the link in it, the did not > get to some pages properly if the relocation link had url parameters. > Is this correct? Do you have a page that makes these links for you? > > http://someurlhere.com/disclaimer.cfm?destination=http://go.reuters. > com/newsArticle. > jhtml?type=healthNews&storyID=12037965&src=eDialog/GetContent > > Or are you asking for help on how to create these kinds of links in > the first place. > > > > > -- > Ian Skinner > Web Programmer > BloodSource > www.BloodSource.org > Sacramento, CA > > - > | 1 | | > - Binary Soduko > | | | > - > > "C code. C code run. Run code run. Please!" > - Cynthia Dunning > > Confidentiality Notice: This message including any > attachments is for the sole use of the intended > recipient(s) and may contain confidential and privileged > information. Any unauthorized review, use, disclosure or > distribution is prohibited. If you are not the > intended recipient, please contact the sender and > delete any copies of this message. > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240143 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: URL Structure
Now that is rather interesting. I can see some use for that behavior. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA - | 1 | | - Binary Soduko | | | - "C code. C code run. Run code run. Please!" - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240137 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: URL Structure
That is def v cool mark, I had never even thought of doing that :-) -Original Message- From: Mark A Kruger [mailto:[EMAIL PROTECTED] Sent: 10 May 2006 18:28 To: CF-Talk Subject: RE: URL Structure Tuan, I'm not sure what you are trying to do, but here's a trick that allows you to manipulate links after the facts, as long as they are inside of " tags. Let's say your user put in "http://blah.com?name=joe J. Smith">Joe J. Smith. What you want to appear is actually http://blah.cfm?nameJoe%20J%2E%20Smith";>Joe J. Smith But you do not want the user to encode it him or herself and you do not what to allow them to do something like "#urlencodedformat("joe j. smith")#" Here's a simple way to do that. On the page that is being served (presumably a CFM Page). Add the following: Then, create a folder called "htm" that branches from that same directory (where the page is being served). Inside that folder place a file titled "a.cfm" that can rewrite it for you. The result is that CF treats a call to as if it were a call to the custom tags. The interior attributes become attributes of the tag. You could even enforce a URL handler to track clicks or whatever. You could do the same with the " tag, tag.. Whatever I have a good sample on my blog: http://mkruger.cfwebtools.com/index.cfm/2006/5/10/adaptive.tags ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240117 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: URL Structure
So I'm basically trying to find a way to have the disclaimer page extract the complete URL from the referring page (which is the page the content editor makes). Do you have this disclaimer page? Or are you asking how to substitute a disclaimer page when a user clicks on a link in content made by your CMS? I understood from your first post, that you had the disclaimer page working, but that when users clicked on the link in it, the did not get to some pages properly if the relocation link had url parameters. Is this correct? Do you have a page that makes these links for you? http://someurlhere.com/disclaimer.cfm?destination=http://go.reuters.com/newsArticle.jhtml?type=healthNews&storyID=12037965&src=eDialog/GetContent Or are you asking for help on how to create these kinds of links in the first place. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA - | 1 | | - Binary Soduko | | | - "C code. C code run. Run code run. Please!" - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240111 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: URL Structure
Tuan, I'm not sure what you are trying to do, but here's a trick that allows you to manipulate links after the facts, as long as they are inside of " tags. Let's say your user put in "http://blah.com?name=joe J. Smith">Joe J. Smith. What you want to appear is actually http://blah.cfm?nameJoe%20J%2E%20Smith";>Joe J. Smith But you do not want the user to encode it him or herself and you do not what to allow them to do something like "#urlencodedformat("joe j. smith")#" Here's a simple way to do that. On the page that is being served (presumably a CFM Page). Add the following: Then, create a folder called "htm" that branches from that same directory (where the page is being served). Inside that folder place a file titled "a.cfm" that can rewrite it for you. The result is that CF treats a call to as if it were a call to the custom tags. The interior attributes become attributes of the tag. You could even enforce a URL handler to track clicks or whatever. You could do the same with the " tag, tag.. Whatever I have a good sample on my blog: http://mkruger.cfwebtools.com/index.cfm/2006/5/10/adaptive.tags ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240108 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: URL Structure
Yes, the user can view the source code which would take them out of WYSIWYG mode. Then they would have to sniff thru all the HTML to find the link and wrap it w/ coldfusion code before they save the document. This is precisely something I don't want them to do because they are not developers, just content editors with no web knowledge. Now instead of them wrapping the link w/ coldfusion code I could probably do it after they save the document. But that would involve me opening up the database where the content is stored, finding the document and then the link and wrapping it myself. The problem with this is the extra work for me and the need for the content editor to contact me whenever a link such as this exist. So I'm basically trying to find a way to have the disclaimer page extract the complete URL from the referring page (which is the page the content editor makes). Anybody got a solution? > The users simply uses the CMS tool and clicks on the "create > hyperlink" button and copys and paste the link in the field. The user > never sees any html. > > What happens after the field is submitted? I would presume that there > would be an opportunity to wrap the submitted field in an > urlencodedformat() function on the action of the field, or when the > field is being fed back out to be clicked on. > > > -- > Ian Skinner > Web Programmer > BloodSource > www.BloodSource.org > Sacramento, CA > > - > | 1 | | > - Binary Soduko > | | | > - > > "C code. C code run. Run code run. Please!" > - Cynthia Dunning > > Confidentiality Notice: This message including any > attachments is for the sole use of the intended > recipient(s) and may contain confidential and privileged > information. Any unauthorized review, use, disclosure or > distribution is prohibited. If you are not the > intended recipient, please contact the sender and > delete any copies of this message. > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240092 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: URL Structure
The users simply uses the CMS tool and clicks on the "create hyperlink" button and copys and paste the link in the field. The user never sees any html. What happens after the field is submitted? I would presume that there would be an opportunity to wrap the submitted field in an urlencodedformat() function on the action of the field, or when the field is being fed back out to be clicked on. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA - | 1 | | - Binary Soduko | | | - "C code. C code run. Run code run. Please!" - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239944 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: URL Structure
The users simply uses the CMS tool and clicks on the "create hyperlink" button and copys and paste the link in the field. The user never sees any html. > The problem I have with this is I'm not the one putting these links on > the page. There are users who uses a content management system that > enters in the content for the website. I want to avoid making the > users use ColdFusion code b/c they don't understand it and it will > complicate things for them. I wanted to this in such a way that all > the ColdFusion code is on the disclaimer page (which I control) and > the referring page (content page w/ the link) is just plain html that > is written for them thru the content management system they use. Is > there another way of doing this? Thanks for your help though. > > > Ok, this is what you want to do. I ran this test code and I get > all > > your second level url variables. > > > > > > > > > href="http:url.cfm?destination=#urlEncodedFormat('http://go.reuters. > > > com/newsArticle. > jhtml> > ?type=healthNews&storyID=12037965&src=eDialog/GetContent')#">Test > jhtml> > > > > > I do not clearly understand your requirements. How is the sample link > being built? > > > For instance lets say a user clicked on a link on my page that went > to: > > http://go.reuters.com/newsArticle. > jhtml?type=healthNews&storyID=12037965&src=eDialog/GetContent > > My page would actually have this as the link http://someurlhere. > com/disclaimer.cfm?destination=http://go.reuters.com/newsArticle. > jhtml?type=healthNews&storyID=12037965&src=eDialog/GetContent > > How is the actual link built in your example? I'm assuming this is > built on some cfm page, if so you just need to wrap the first link in > a urlEncodedFunction() when you make the second link. > > If this is not possible, you could treat the entire link as a list > delimitated by the question mark ('?'). The first element of the list > is your url, the second element would be your url parameters and the > third element would be the url parameters of the second link. > > Does that make sense? > > > -- > Ian Skinner > Web Programmer > BloodSource > www.BloodSource.org > Sacramento, CA > > - > | 1 | | > - Binary Soduko > | | | > - > > "C code. C code run. Run code run. Please!" > - Cynthia Dunning > > Confidentiality Notice: This message including any > attachments is for the sole use of the intended > recipient(s) and may contain confidential and privileged > information. Any unauthorized review, use, disclosure or > distribution is prohibited. If you are not the > intended recipient, please contact the sender and > delete any copies of this message. > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239908 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: URL Structure
The problem I have with this is I'm not the one putting these links on the page. There are users who uses a content management system that enters in the content for the website. I want to avoid making the users use ColdFusion code b/c they don't understand it and it will complicate things for them. I wanted to this in such a way that all the ColdFusion code is on the disclaimer page (which I control) and the referring page (content page w/ the link) is just plain html that is written for them thru the content management system they use. Is there another way of doing this? Thanks for your help though. > Ok, this is what you want to do. I ran this test code and I get all > your second level url variables. > > > > href="http:url.cfm?destination=#urlEncodedFormat('http://go.reuters. > com/newsArticle. jhtml> ?type=healthNews&storyID=12037965&src=eDialog/GetContent')#">Test jhtml> > I do not clearly understand your requirements. How is the sample link being built? For instance lets say a user clicked on a link on my page that went to: http://go.reuters.com/newsArticle.jhtml?type=healthNews&storyID=12037965&src=eDialog/GetContent My page would actually have this as the link http://someurlhere.com/disclaimer.cfm?destination=http://go.reuters.com/newsArticle.jhtml?type=healthNews&storyID=12037965&src=eDialog/GetContent http://www.houseoffusion.com/lists.cfm/link=i:4:239850 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: URL Structure
The problem I have with this is I'm not the one putting these links on the page. There are users who uses a content managment system that enters in the content for the website. I want to avoid making the users use Coldfusion code b/c they don't understand it and it will complicate things for them. I wanted to this in such a way that all the coldfusion code is on the disclaimer page (which I control) and the referring page (content page w/ the link) is just plain html that is written for them thru the content managment system they use. Is there another way of doing this? Thanks for your help though. > Ok, this is what you want to do. I ran this test code and I get all > your second level url variables. > > > > http://go.reuters. > com/newsArticle. jhtml> ?type=healthNews&storyID=12037965&src=eDialog/GetContent')#">Test > > > > -- > Ian Skinner > Web Programmer > BloodSource > www.BloodSource.org > Sacramento, CA > > - > | 1 | | > - Binary Soduko > | | | > - > > "C code. C code run. Run code run. Please!" > - Cynthia Dunning > > Confidentiality Notice: This message including any > attachments is for the sole use of the intended > recipient(s) and may contain confidential and privileged > information. Any unauthorized review, use, disclosure or > distribution is prohibited. If you are not the > intended recipient, please contact the sender and > delete any copies of this message. > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239846 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: URL Structure
Ok, this is what you want to do. I ran this test code and I get all your second level url variables. http://go.reuters.com/newsArticle.jhtml?type=healthNews&storyID=12037965&src=eDialog/GetContent')#">Test -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA - | 1 | | - Binary Soduko | | | - "C code. C code run. Run code run. Please!" - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239710 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: URL Structure
Hi Tuan Maybe something like this would help, #i# #i2# This is only rough but im sure you get the jist, obviously you would need to pretty it up and the var set would be your query string instead, i mean there are numerous paths you could take, this was the route I initially thought of. Hope it helps Jose On 5/5/06, Ian Skinner <[EMAIL PROTECTED]> wrote: > > My page would actually have this as the link > http://someurlhere.com/disclaimer.cfm?destination=http://go.reuters.com/newsArticle.jhtml?type=healthNews&storyID=12037965&src=eDialog/GetContent > > The suspect the trouble is the second '?' character. It should not be > allowed. The simplest solution, but untried, would be to urlencode() your > destination value so that these special characters are escaped. You can > then urlDecode() the value in your redirection page to get the folks to > where they are supposed to go. > > > -- > Ian Skinner > Web Programmer > BloodSource > www.BloodSource.org > Sacramento, CA > > - > | 1 | | > - Binary Soduko > | | | > - > > "C code. C code run. Run code run. Please!" > - Cynthia Dunning > > Confidentiality Notice: This message including any > attachments is for the sole use of the intended > recipient(s) and may contain confidential and privileged > information. Any unauthorized review, use, disclosure or > distribution is prohibited. If you are not the > intended recipient, please contact the sender and > delete any copies of this message. > > > > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239687 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: URL Structure
My page would actually have this as the link http://someurlhere.com/disclaimer.cfm?destination=http://go.reuters.com/newsArticle.jhtml?type=healthNews&storyID=12037965&src=eDialog/GetContent The suspect the trouble is the second '?' character. It should not be allowed. The simplest solution, but untried, would be to urlencode() your destination value so that these special characters are escaped. You can then urlDecode() the value in your redirection page to get the folks to where they are supposed to go. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA - | 1 | | - Binary Soduko | | | - "C code. C code run. Run code run. Please!" - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239650 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: URL Structure
I'm actually creating a disclaimer page that redirects the users. So the user sees a disclaimer page indicating they are leaving the site and connecting to an outside site. Then they get redirected to that site. For some reason my disclaimer redirect code wasn't working correctly for links that had multiple url variables in it. It would get cut off after the end of thefirst url variable. The user wouldn't get redirected to the page intended b/c of this. For instance lets say a user clicked on a link on my page that went to: http://go.reuters.com/newsArticle.jhtml?type=healthNews&storyID=12037965&src=eDialog/GetContent My page would actually have this as the link http://someurlhere.com/disclaimer.cfm?destination=http://go.reuters.com/newsArticle.jhtml?type=healthNews&storyID=12037965&src=eDialog/GetContent the disclaimer.cfm would look something like this: <!-- function dspDisclaim(){ setTimeout('window.location.href="#destination#"',1); } //--> Now this worked fine when there wasn't multiple url vars in the original link, but as you can see this reuter link has mutliple vars in it. So to fix it so that all the url vars got included in my redirect i did this: This actually recontructed the URL correctly with all the URL vars, but the problem is this particular link is case sensitive and does not work when the url vars got recontructed in uppercases letters. Maybe I'm doing the whole redirect thing incorrectly or theres an easier way. But if anybody can help me out, I would appreciate it. Thanks. >I don't think you can. CF is case-insensitive for one thing. > >It looks like case MIGHT be preserved in CGI.QUERY_STRING. So you could >try the following: > > > #listFirst(keyvalue,"=")# = >#listLast(keyvalue,"=")# > > >A couple of problems with that, of course: > >- Any URL variables you've explicitly set (such as with cfparam) or >removed won't be accounted for. >- You need to care for instances when there is a key but no value. >"key1=&key2=a" > >Why do you need to see your URL variables in their original case? > > > > >-Original Message- >From: Tuan Tran [mailto:[EMAIL PROTECTED] >Sent: Friday, May 05, 2006 11:35 AM >To: CF-Talk >Subject: URL Structure > >Hi Everybody, > >I'm trying to get the name/value pair from url variables. Lets say I >have a url like this: > >http://someurlhere.com?Src=blahblah&storyID=1234 > >Now if I do the following I'll get the name/value pair of the URL vars: > > > #urlVar# = #url[urlVar]# > >My problem is the name element doesn't keep the same case as the actualy >url variable name. Src and storyID gets displayed as SRC and STORYID in >the output. How can I keep the case the same when I loop thru the URL >structure? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239643 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: URL Structure
I think the simplest solution is to uCase the variables when you pass them via the URL. On 05/05/06, Tuan Tran <[EMAIL PROTECTED]> wrote: > Hi Everybody, > > I'm trying to get the name/value pair from url variables. Lets say I have a > url like this: > > http://someurlhere.com?Src=blahblah&storyID=1234 > > Now if I do the following I'll get the name/value pair of the URL vars: > > > #urlVar# = #url[urlVar]# > > > My problem is the name element doesn't keep the same case as the actualy url > variable name. Src and storyID gets displayed as SRC and STORYID in the > output. How can I keep the case the same when I loop thru the URL structure? > > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239620 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: URL Structure
I don't think you can - CF has always uppercased the Keys. -Original Message- From: Tuan Tran [mailto:[EMAIL PROTECTED] Sent: 05 May 2006 16:35 To: CF-Talk Subject: URL Structure Hi Everybody, I'm trying to get the name/value pair from url variables. Lets say I have a url like this: http://someurlhere.com?Src=blahblah&storyID=1234 Now if I do the following I'll get the name/value pair of the URL vars: #urlVar# = #url[urlVar]# My problem is the name element doesn't keep the same case as the actualy url variable name. Src and storyID gets displayed as SRC and STORYID in the output. How can I keep the case the same when I loop thru the URL structure? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239619 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: URL Structure
> I'm trying to get the name/value pair from url variables. > Lets say I have a url like this: > > http://someurlhere.com?Src=blahblah&storyID=1234 > > Now if I do the following I'll get the name/value pair of the > URL vars: > > > #urlVar# = #url[urlVar]# > > My problem is the name element doesn't keep the same case as > the actualy url variable name. Src and storyID gets > displayed as SRC and STORYID in the output. How can I keep > the case the same when I loop thru the URL structure? You can't, really. CF doesn't think that's important information, so it doesn't store variable names that way. This is common in case-insensitive programming languages, I suspect. You could, however, examine the query string directly. But why do you need the case of the variable name to be preserved anyway? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239618 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: URL Structure
You can just parse it as a list of lists. The main list is a list delimited by &. The sub lists are delimited by =. You would need to urlDecodedFormat() on the right hand side. Oh, and the variable itself comes from cgi.query_string. On 5/5/06, Tuan Tran <[EMAIL PROTECTED]> wrote: > Hi Everybody, > > I'm trying to get the name/value pair from url variables. Lets say I have a > url like this: > > http://someurlhere.com?Src=blahblah&storyID=1234 > > Now if I do the following I'll get the name/value pair of the URL vars: > > > #urlVar# = #url[urlVar]# > > > My problem is the name element doesn't keep the same case as the actualy url > variable name. Src and storyID gets displayed as SRC and STORYID in the > output. How can I keep the case the same when I loop thru the URL structure? > > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239617 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: URL Structure
I don't think you can. CF is case-insensitive for one thing. It looks like case MIGHT be preserved in CGI.QUERY_STRING. So you could try the following: #listFirst(keyvalue,"=")# = #listLast(keyvalue,"=")# A couple of problems with that, of course: - Any URL variables you've explicitly set (such as with cfparam) or removed won't be accounted for. - You need to care for instances when there is a key but no value. "key1=&key2=a" Why do you need to see your URL variables in their original case? -Original Message- From: Tuan Tran [mailto:[EMAIL PROTECTED] Sent: Friday, May 05, 2006 11:35 AM To: CF-Talk Subject: URL Structure Hi Everybody, I'm trying to get the name/value pair from url variables. Lets say I have a url like this: http://someurlhere.com?Src=blahblah&storyID=1234 Now if I do the following I'll get the name/value pair of the URL vars: #urlVar# = #url[urlVar]# My problem is the name element doesn't keep the same case as the actualy url variable name. Src and storyID gets displayed as SRC and STORYID in the output. How can I keep the case the same when I loop thru the URL structure? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239616 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
URL Structure
Hi Everybody, I'm trying to get the name/value pair from url variables. Lets say I have a url like this: http://someurlhere.com?Src=blahblah&storyID=1234 Now if I do the following I'll get the name/value pair of the URL vars: #urlVar# = #url[urlVar]# My problem is the name element doesn't keep the same case as the actualy url variable name. Src and storyID gets displayed as SRC and STORYID in the output. How can I keep the case the same when I loop thru the URL structure? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239614 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: URL structure
Here is one way to loop URL var. Name Value Pair: #namevaluepair# Variable name: #varname# = [#evaluate('url.#varname#')#] But the URL vars are in a structure. hmmm... works so you can reengineer that code. but to shorten this works #varname#: #evaluate('url.#varname#')# From: "Bryan Stevenson" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: CF-Talk <[EMAIL PROTECTED]> Subject: URL structure Date: Tue, 3 Sep 2002 13:16:04 -0700 Hey All, I'm having trouble finding a snippet to loop over the URL structure...any examples?? TIA Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. t. 250.920.8830 e. [EMAIL PROTECTED] - Macromedia Associate Partner www.macromedia.com - Vancouver Island ColdFusion Users Group Founder & Director www.cfug-vancouverisland.com __ 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: URL structure
NevermindI found it ;-) Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. t. 250.920.8830 e. [EMAIL PROTECTED] - Macromedia Associate Partner www.macromedia.com - Vancouver Island ColdFusion Users Group Founder & Director www.cfug-vancouverisland.com - Original Message - From: "Bryan Stevenson" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, September 03, 2002 1:16 PM Subject: URL structure > Hey All, > > I'm having trouble finding a snippet to loop over the URL structure...any > examples?? > > TIA > > Bryan Stevenson B.Comm. > VP & Director of E-Commerce Development > Electric Edge Systems Group Inc. > t. 250.920.8830 > e. [EMAIL PROTECTED] > > - > Macromedia Associate Partner > www.macromedia.com > - > Vancouver Island ColdFusion Users Group > Founder & Director > www.cfug-vancouverisland.com > > __ 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: URL structure
#i# -Brad > -Original Message- > From: Bryan Stevenson [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 03, 2002 4:16 PM > To: CF-Talk > Subject: URL structure > > > Hey All, > > I'm having trouble finding a snippet to loop over the URL structure...any > examples?? > > TIA > > Bryan Stevenson B.Comm. > VP & Director of E-Commerce Development > Electric Edge Systems Group Inc. > t. 250.920.8830 > e. [EMAIL PROTECTED] > > - > Macromedia Associate Partner > www.macromedia.com > - > Vancouver Island ColdFusion Users Group > Founder & Director > www.cfug-vancouverisland.com > > __ 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
URL structure
Hey All, I'm having trouble finding a snippet to loop over the URL structure...any examples?? TIA Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. t. 250.920.8830 e. [EMAIL PROTECTED] - Macromedia Associate Partner www.macromedia.com - Vancouver Island ColdFusion Users Group Founder & Director www.cfug-vancouverisland.com __ 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