AW: Getting parameter to CF
Hello, I found the solution #cgi.REDIRECT_URL# #cgi.REDIRECT_QUERY_STRING# Is my friend. I got all parameter I want !! Thanks to you Daniel -Ursprüngliche Nachricht- Von: Jon Clausen [mailto:[EMAIL PROTECTED] Gesendet: Samstag, 6. Januar 2007 04:19 An: CF-Talk Betreff: Re: Getting parameter to CF Daniel, Do you have any rewrite rules configured? If so, the method of accessing your path variable depends on the Rewrite Rule. For example, I have this rewrite rule in one of my apps: RewriteRule ^www/go/(.*) /go.cfm?path=/go/$1$2 [L,PT] When that rule was in effect, any path information after the /go/ would be accessed with the CGI.QUERY_STRING variable. If you don't have a rewrite rule in effect, you can simply access that through the CGI.SCRIPT_NAME variable by using the / as a list delimiter. In your case with your url (www.testesttest.com/[PARAMETER1]/? testvar1=danieltestvar2=peter): Your CGI.SCRIPT_NAME would be /[PARAMETER1]/index.cfm You could get Parameter1 with: cfset parameter1 = listFirst(CGI.SCRIPT_NAME,/) HTH, Jon On Jan 5, 2007, at 7:55 PM, Daniel Hikel wrote: Hello, I searched the internet and some documentation about getting a parameter direct to coldfusion, but till know it does not working. I am opening my internetpage: www.testesttest.com/[PARAMETER1]/?testvar1=danieltestvar2=peter The url bevause of different parameter1 does not existing that while im using an .htaccess file with modrewrite # .HTACCESS FILE FOR MODREWRITE RewriteEngine on # REDIRECTION ErrorDocument 404 /channel/index.cfm # END Till now I used the rewrite and javascript to get PARAMETER1 but the other url-parameter got lost. JS-Script today: script text = self.location.href; text= text.replace(/http:\/\//,); text= text.replace(/#cgi.http_host#\//,); location.href = 'http://#cgi.http_host#/channel/index.cfm?channel='+text; /script So is there a better way to get the parameter1 and all the other parameters? I thought to get the parameter from an cgi. Variable but I found no suitable one. Any ideas? Thanks in advance. Daniel ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265913 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Getting parameter to CF
Hello, I searched the internet and some documentation about getting a parameter direct to coldfusion, but till know it does not working. I am opening my internetpage: www.testesttest.com/[PARAMETER1]/?testvar1=danieltestvar2=peter The url bevause of different parameter1 does not existing that while im using an .htaccess file with modrewrite # .HTACCESS FILE FOR MODREWRITE RewriteEngine on # REDIRECTION ErrorDocument 404 /channel/index.cfm # END Till now I used the rewrite and javascript to get PARAMETER1 but the other url-parameter got lost. JS-Script today: script text = self.location.href; text= text.replace(/http:\/\//,); text= text.replace(/#cgi.http_host#\//,); location.href = 'http://#cgi.http_host#/channel/index.cfm?channel='+text; /script So is there a better way to get the parameter1 and all the other parameters? I thought to get the parameter from an cgi. Variable but I found no suitable one. Any ideas? Thanks in advance. Daniel ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265897 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Getting parameter to CF
Daniel, Do you have any rewrite rules configured? If so, the method of accessing your path variable depends on the Rewrite Rule. For example, I have this rewrite rule in one of my apps: RewriteRule ^www/go/(.*) /go.cfm?path=/go/$1$2 [L,PT] When that rule was in effect, any path information after the /go/ would be accessed with the CGI.QUERY_STRING variable. If you don't have a rewrite rule in effect, you can simply access that through the CGI.SCRIPT_NAME variable by using the / as a list delimiter. In your case with your url (www.testesttest.com/[PARAMETER1]/? testvar1=danieltestvar2=peter): Your CGI.SCRIPT_NAME would be /[PARAMETER1]/index.cfm You could get Parameter1 with: cfset parameter1 = listFirst(CGI.SCRIPT_NAME,/) HTH, Jon On Jan 5, 2007, at 7:55 PM, Daniel Hikel wrote: Hello, I searched the internet and some documentation about getting a parameter direct to coldfusion, but till know it does not working. I am opening my internetpage: www.testesttest.com/[PARAMETER1]/?testvar1=danieltestvar2=peter The url bevause of different parameter1 does not existing that while im using an .htaccess file with modrewrite # .HTACCESS FILE FOR MODREWRITE RewriteEngine on # REDIRECTION ErrorDocument 404 /channel/index.cfm # END Till now I used the rewrite and javascript to get PARAMETER1 but the other url-parameter got lost. JS-Script today: script text = self.location.href; text= text.replace(/http:\/\//,); text= text.replace(/#cgi.http_host#\//,); location.href = 'http://#cgi.http_host#/channel/index.cfm?channel='+text; /script So is there a better way to get the parameter1 and all the other parameters? I thought to get the parameter from an cgi. Variable but I found no suitable one. Any ideas? Thanks in advance. Daniel ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265904 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4