Re: redirect question SERVER_NAME script_name

2009-01-30 Thread Paul Ihrig

yeah  have full access.
its iis

On Tue, Jan 27, 2009 at 4:49 PM, Mark Pederson m...@netgoofy.com wrote:
 Hey Mark.
 could you please explain how you implemented the ISAPI re-write.


 Well I guess it depends on a few things. Do you have access to the web 
 server? What is it running?
 In my case I have full control of the IIS servers and used Ionic Isapi 
 rewriter
 http://www.codeplex.com/IIRF

 I just make the simple entries in the .inf file and it works well.

 If you are using Apache you would use mod_rewrite either in the httpd.conf 
 file, or if you don't have access, then in a .htaccess file in your root.


 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318646
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: redirect question SERVER_NAME script_name

2009-01-27 Thread Paul Ihrig
hey guys looks like

Missing Template Handler points to 404.cfm in cf admin

which was causing it to ignore #CGI.SCRIPT_NAME# if there was no
folder and no index.cfm
how can i override the cfadmin missing template handler?

cfif #CGI.SERVER_NAME# CONTAINS morel.com AND #CGI.SCRIPT_NAME#
CONTAINS /tasty/
   cflocation
url=/literature/literature_view.cfm?id=557sbu=01action
addtoken=no
  /cfif

On Mon, Jan 26, 2009 at 11:47 AM, Paul Ihrig pih...@gmail.com wrote:
 ok.
 it dosnt work if there is no folder on the server called tasty

 CGI.SCRIPT_NAME

 it does work if there is a folder.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318616
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: redirect question SERVER_NAME script_name

2009-01-27 Thread Mark Pederson
I had the same problem and ended up using ISAPI re-write to do the job. The 
request is redirected before it gets processed by CF at the web server level. I 
initially was just creating the folder and puttinbg in  an index.cfm with the 
re-direct, but it got ugly real fast. You could also possibly put the redirect 
into the error handling template, but that doesn't seem to elegant, it 
definitely would mess with your server logs if you track errored templates that 
way. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318622
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: redirect question SERVER_NAME script_name

2009-01-27 Thread Paul Ihrig
Hey Mark.
could you please explain how you implemented the ISAPI re-write.

i did do cfif #cgi.QUERY_STRING# CONTAINS product=tasty
which worked just fine.
but the guy wanted morels.com/tasty for add placement, he says its
easier for user to type in the morels.com?product=tasty

so yeah, it makes folder structure real ugly.
-paul

On Tue, Jan 27, 2009 at 1:11 PM, Mark Pederson m...@netgoofy.com wrote:
 I had the same problem and ended up using ISAPI re-write to do the job. The 
 request is redirected before it gets processed by CF at the web server level. 
 I initially was just creating the folder and puttinbg in  an index.cfm with 
 the re-direct, but it got ugly real fast. You could also possibly put the 
 redirect into the error handling template, but that doesn't seem to elegant, 
 it definitely would mess with your server logs if you track errored templates 
 that way.

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318629
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: redirect question SERVER_NAME script_name

2009-01-27 Thread Mark Pederson
 Hey Mark.
 could you please explain how you implemented the ISAPI re-write.


Well I guess it depends on a few things. Do you have access to the web server? 
What is it running?
In my case I have full control of the IIS servers and used Ionic Isapi rewriter
http://www.codeplex.com/IIRF

I just make the simple entries in the .inf file and it works well.

If you are using Apache you would use mod_rewrite either in the httpd.conf 
file, or if you don't have access, then in a .htaccess file in your root. 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318631
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: redirect question SERVER_NAME script_name

2009-01-26 Thread Adrian Lynch
Just out put it.

Dump the CGI scope to see the parts you need.

SCRIPT_NAME will include the file name.

Also be careful of case. Why not FindNoCase()?

Adrian

 -Original Message-
 From: Paul Ihrig [mailto:pih...@gmail.com]
 Sent: 26 January 2009 15:13
 To: cf-talk
 Subject: redirect question SERVER_NAME script_name
 
 hey guys..
 
 trying to set up a ton of redirects in application.cfm
 
 they don't seem to be working.
 
 i want if  url is www.morel/tasty/
 to goto a addy...
 
 cfif #CGI.SERVER_NAME# CONTAINS www.morel.com/tasty/
 cflocation url=/products/index.cfm?n1Id=1n2Id=7
 addtoken=no
 /cfif
 
 not sure if i need to check script_name to check for folder.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318528
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: redirect question SERVER_NAME script_name

2009-01-26 Thread Casey Dougall
On Mon, Jan 26, 2009 at 10:12 AM, Paul Ihrig pih...@gmail.com wrote:

 hey guys..

 trying to set up a ton of redirects in application.cfm

 they don't seem to be working.

 i want if  url is www.morel/tasty/
 to goto a addy...

 cfif #CGI.SERVER_NAME# CONTAINS www.morel.com/tasty/
cflocation url=/products/index.cfm?n1Id=1n2Id=7 addtoken=no
 /cfif


Get rid of www first.

cfset Request.ChannelName=
ReplaceNoCase(CGI.SERVER_NAME,www.,,ALL)

switch based on server name and if you need tasty then you need to add
cgi.scriptname.

cfswitch expression=#Trim(REQUEST.ChannelName)##CGI.ScriptName#
cfcase value=morel.com/tasty http://www.morel.com/tasty/
cflocation url=/products/index.cfm?n1Id=1n2Id=7 addtoken=no
/cfcase
cfdefaultcase
leave this blank
/cfdefaultcase
/cfswitch

Casey


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318532
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: redirect question SERVER_NAME script_name

2009-01-26 Thread Paul Ihrig
nm...

cfif #CGI.SERVER_NAME# CONTAINS www.morel.ca AND #SCRIPT_NAME#
CONTAINS /tasty/
 cflocation url=/products/index.cfm?n1Id=1n2Id=7 addtoken=no
/cfif

On Mon, Jan 26, 2009 at 10:12 AM, Paul Ihrig pih...@gmail.com wrote:
 hey guys..

 trying to set up a ton of redirects in application.cfm

 they don't seem to be working.

 i want if  url is www.morel/tasty/
 to goto a addy...

 cfif #CGI.SERVER_NAME# CONTAINS www.morel.com/tasty/
cflocation url=/products/index.cfm?n1Id=1n2Id=7 addtoken=no
 /cfif

 not sure if i need to check script_name to check for folder.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318531
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: redirect question SERVER_NAME script_name

2009-01-26 Thread Casey Dougall
On Mon, Jan 26, 2009 at 10:23 AM, Paul Ihrig pih...@gmail.com wrote:

 nm...

 cfif #CGI.SERVER_NAME# CONTAINS www.morel.ca AND #SCRIPT_NAME#
 CONTAINS /tasty/
  cflocation url=/products/index.cfm?n1Id=1n2Id=7 addtoken=no
 /cfif


I'd still do that in a cfswitch instead, and get rid of www before you check
because people may type morel.ca not the subdomain cname www


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318535
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: redirect question SERVER_NAME script_name

2009-01-26 Thread Jason Fisher
cgi.server_name will only give you the www.morel.com part, so you'll need to 
look at parts of cgi.sript_name as well to get subdir's 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318533
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: redirect question SERVER_NAME script_name

2009-01-26 Thread Greg Luce
Yeah, SERVER_NAME is only going to have the server name, not the
subdirectory. You'll have to look at CF_TEMPLATE_PATH or PATH_TRANSLATED I
think to find tasty.

Greg


On Mon, Jan 26, 2009 at 10:12 AM, Paul Ihrig pih...@gmail.com wrote:

 hey guys..

 trying to set up a ton of redirects in application.cfm

 they don't seem to be working.

 i want if  url is www.morel/tasty/
 to goto a addy...

 cfif #CGI.SERVER_NAME# CONTAINS www.morel.com/tasty/
cflocation url=/products/index.cfm?n1Id=1n2Id=7 addtoken=no
 /cfif

 not sure if i need to check script_name to check for folder.

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318538
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: redirect question SERVER_NAME script_name

2009-01-26 Thread Paul Ihrig
man..
this only works if there is a folder called /tasty/
i need it to work with out the folder being there.,

On Mon, Jan 26, 2009 at 10:23 AM, Paul Ihrig pih...@gmail.com wrote:
 nm...

 cfif #CGI.SERVER_NAME# CONTAINS www.morel.ca AND #SCRIPT_NAME#
 CONTAINS /tasty/
 cflocation url=/products/index.cfm?n1Id=1n2Id=7 addtoken=no
 /cfif

 On Mon, Jan 26, 2009 at 10:12 AM, Paul Ihrig pih...@gmail.com wrote:
 hey guys..

 trying to set up a ton of redirects in application.cfm

 they don't seem to be working.

 i want if  url is www.morel/tasty/
 to goto a addy...

 cfif #CGI.SERVER_NAME# CONTAINS www.morel.com/tasty/
cflocation url=/products/index.cfm?n1Id=1n2Id=7 addtoken=no
 /cfif

 not sure if i need to check script_name to check for folder.



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318540
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: redirect question SERVER_NAME script_name

2009-01-26 Thread Greg Luce
You forgot the CGI scope on the second condition here:

cfif #CGI.SERVER_NAME# CONTAINS www.morel.ca AND #SCRIPT_NAME#
CONTAINS /tasty/
cflocation url=/products/index.cfm?n1Id=1n2Id=7 addtoken=no
/cfif
Should be CGI.SCRIPT_NAME

Greg
On Mon, Jan 26, 2009 at 10:31 AM, Greg Luce luce...@gmail.com wrote:

 Yeah, SERVER_NAME is only going to have the server name, not the
 subdirectory. You'll have to look at CF_TEMPLATE_PATH or PATH_TRANSLATED I
 think to find tasty.

 Greg


   On Mon, Jan 26, 2009 at 10:12 AM, Paul Ihrig pih...@gmail.com wrote:

 hey guys..

 trying to set up a ton of redirects in application.cfm

 they don't seem to be working.

 i want if  url is www.morel/tasty/
 to goto a addy...

 cfif #CGI.SERVER_NAME# CONTAINS www.morel.com/tasty/
cflocation url=/products/index.cfm?n1Id=1n2Id=7 addtoken=no
 /cfif

 not sure if i need to check script_name to check for folder.

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318541
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: redirect question SERVER_NAME script_name

2009-01-26 Thread Paul Ihrig
ok.
it dosnt work if there is no folder on the server called tasty

CGI.SCRIPT_NAME

it does work if there is a folder.

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318550
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4