Can anybody see a problem with this?

2002-08-01 Thread Bill Henderson

Hey All - 
 
The marketing department of my company wanted to have a list of
directories with names of marketing contacts.
(http://www.mycompany.com/BillHenderson/, etc) I first set up a tool
using cfdirectory and cffile to create the directories and put the files
in them. I found that making changes to the files in the directories or
adding new directories or deleting the directories caused quite a lot of
problems, not to mention the clutter it caused in the root directory of
the site, so I came up with this idea, that does not actually use any
custom directories at all, and I want to know if anybody can see
possible security problems, server resource issues, etc.
 
1. The user enters the URL in browser with custom directory at the end 
 
2. IIS catches the 404 error and uses a custom cfm template 
 
3. The cfm template pulls the directory out of the url and checks it
against a list of names from a cached query 
 
4. If it find a match, it cf_locations to a template with custom content
for the marketing contact 
 
5. If no match is found, it cf_locations to the standard 404b.htm from
IIS.
 
Any insight would be appreciated.
 
Bill Henderson
[EMAIL PROTECTED]
 


__
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: Can anybody see a problem with this?

2002-08-01 Thread Alistair Davidson

Hi Bill

Off the top of my head I can't think of a reason why that wouldn't work,
but to my mind, relying on the server's error catching to perform
designed functionality just feels wrong - it feels like bad design,
and it's shifting some of your logic from the application itself to the
server software that it's running under. Just my opinion, of course, but
if it was me, I'd either -
 
- make the default CFM template strip the name of the directory out of
the url and check it against the query.

- use a url such as http://www.mycompany.com/contacts/BillHenderson ,
and put an extension-less file called contacts in the root. Make IIS
pass files with no extension through CF and put your logic to get the
name, check the query and re-locate, into that contacts file. I've used
this myself many times on many different webservers, with no problems.

Hope that helps!

Alistair

Alistair Davidson
Application Developer
www.smartgroups.com
Freeserve.com PLC

-Original Message-
From: Bill Henderson [mailto:[EMAIL PROTECTED]] 
Sent: 01 August 2002 09:05
To: CF-Talk
Subject: Can anybody see a problem with this?

Hey All - 
 
The marketing department of my company wanted to have a list of
directories with names of marketing contacts.
(http://www.mycompany.com/BillHenderson/, etc) I first set up a tool
using cfdirectory and cffile to create the directories and put the files
in them. I found that making changes to the files in the directories or
adding new directories or deleting the directories caused quite a lot of
problems, not to mention the clutter it caused in the root directory of
the site, so I came up with this idea, that does not actually use any
custom directories at all, and I want to know if anybody can see
possible security problems, server resource issues, etc.
 
1. The user enters the URL in browser with custom directory at the end 
 
2. IIS catches the 404 error and uses a custom cfm template 
 
3. The cfm template pulls the directory out of the url and checks it
against a list of names from a cached query 
 
4. If it find a match, it cf_locations to a template with custom content
for the marketing contact 
 
5. If no match is found, it cf_locations to the standard 404b.htm from
IIS.
 
Any insight would be appreciated.
 
Bill Henderson
[EMAIL PROTECTED]
 



__
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: Can anybody see a problem with this?

2002-08-01 Thread Sean A Corfield

On Thursday, August 1, 2002, at 06:05 , Alistair Davidson wrote:
 Off the top of my head I can't think of a reason why that wouldn't work,
 but to my mind, relying on the server's error catching to perform
 designed functionality just feels wrong - it feels like bad design,
 and it's shifting some of your logic from the application itself to the
 server software that it's running under.

Well, whichever way you slice this problem, it amounts to much the same 
thing: URL mapping. People who use Apache do this sort of stuff all the 
time via rewrite rules, redirects and proxies. If I was Bill, I'd dumped 
IIS and install Apache and have it rewrite the URLs from ^/[A-Za-z]*/?$ to 
/lookup.cfm?directory=$1 (which would also have to deal with any other 
valid top-level directories that had default index pages). Although with 
Apache, you could make the redirects and rewrites as smart as you wanted.

Generally, people who run Apache feel that customizing Apache to achieve 
the desired result for the web site is perfectly reasonable - the config 
is all in text files that you can keep under version control. I can see 
why people who run IIS wouldn't want to do the same sort of thing...

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

__
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: Can anybody see a problem with this?

2002-08-01 Thread Dan Haley

And in those corporate environments where the system admins wear Microsoft
socks and Bill Gates underwear?  Throwing Apache onto the production web
servers might not get you employee of the year.  ;)

While Apache may be able to do so much more so much easier (for some!),
sometimes you have to figure out a way to work with the tools you have ... 

IIS will allow you to backup and restore your configuration.  Right click on
IIS in MMC and you should have the option to do that.

As for handling the marketing folks' desires, there is a way to handle this
in IIS without relying on the 404 message handler.

1) Create a sub-directory that you will use for all these requests, say
maybe 'people', so the request would look like
http://www.mydomain.com/people/billhenderson.  Or, alternatively set up a
subdomain: people.mydomain.com/billhenderson.

2) In IIS, for that directory or subdomain, go to properties and choose the
directory tab.  Change the 'When connecting to this resource, the content
should come from:' option to 'A redirection to a URL', and enter in the
redirect to box /people.cfm?person=$0.  (use the help on that tab to see
other options)

3) Now the URL http://www.mydomain.com/people/billhenderson will be
redirected to http://www.mydomain.com/people.cfm?person=/billhenderson.

Same basic effect as Apache, just a little more(?) work to set up and a
little less flexibility.

Dan


-Original Message-
From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 01, 2002 10:13 AM
To: CF-Talk
Subject: Re: Can anybody see a problem with this?


On Thursday, August 1, 2002, at 06:05 , Alistair Davidson wrote:
 Off the top of my head I can't think of a reason why that wouldn't work,
 but to my mind, relying on the server's error catching to perform
 designed functionality just feels wrong - it feels like bad design,
 and it's shifting some of your logic from the application itself to the
 server software that it's running under.

Well, whichever way you slice this problem, it amounts to much the same 
thing: URL mapping. People who use Apache do this sort of stuff all the 
time via rewrite rules, redirects and proxies. If I was Bill, I'd dumped 
IIS and install Apache and have it rewrite the URLs from ^/[A-Za-z]*/?$ to 
/lookup.cfm?directory=$1 (which would also have to deal with any other 
valid top-level directories that had default index pages). Although with 
Apache, you could make the redirects and rewrites as smart as you wanted.

Generally, people who run Apache feel that customizing Apache to achieve 
the desired result for the web site is perfectly reasonable - the config 
is all in text files that you can keep under version control. I can see 
why people who run IIS wouldn't want to do the same sort of thing...

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood


__
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: Can anybody see a problem with this?

2002-08-01 Thread Dave Watts

 Generally, people who run Apache feel that customizing Apache 
 to achieve the desired result for the web site is perfectly 
 reasonable - the config is all in text files that you can 
 keep under version control. I can see why people who run IIS 
 wouldn't want to do the same sort of thing...

While the IIS metabase isn't a text file, you can certainly do the same sort
of thing - you can backup and restore metabase files, or you can make the
changes through scripts (and archive the scripts).

In addition, there are plenty of ISAPI filters that do the same thing as
mod_rewrite:
http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=IIS+%2Bmod_rewrite

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
__
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: Can anybody see a problem with this?

2002-08-01 Thread Dave Watts

 And in those corporate environments where the system admins 
 wear Microsoft socks and Bill Gates underwear? Throwing Apache 
 onto the production web servers might not get you employee 
 of the year.  ;)

Yeah, Sean, while they're at it they might get rid of their OTHER
proprietary software ...

And, Dan, please, no more Bill Gates underwear references. Please.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
__
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: Can anybody see a problem with this?

2002-08-01 Thread S . Isaac Dealey

 wear snip Bill Gates underwear

shudder did you have to go there? :)

Isaac Dealey
Certified Advanced ColdFusion Developer

www.turnkey.to
954-776-0046
__
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: Can anybody see a problem with this?

2002-08-01 Thread Bill Henderson

Dan - you wrote:

2) In IIS, for that directory or subdomain, go to properties and choose
the
directory tab.  Change the 'When connecting to this resource, the
content
should come from:' option to 'A redirection to a URL', and enter in the
redirect to box /people.cfm?person=$0.  (use the help on that tab to
see
other options)


I would love to do this, however, boss wants
http://www.mydomain.com/BillHenderson format only. Is there any way I
can do something close to what you suggested without straying from the
boss man's idea?

And as far as the URL rewrites, I found a IIS mod_rewrite and started
playing around with it, it looks like I can do what I need, but I need
to have that format showing in the browser's address bar. Any
workarounds?

Bill At least my nit-picky boss is a nice guy Henderson
[EMAIL PROTECTED]




__
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: Can anybody see a problem with this?

2002-08-01 Thread Dan Haley

That would mean making the root directory a redirect, which I don't think
you want to do, unless none of your other URLs are at the root.  Sure you
can't convince him to use a subdomain?  bossman.mydomain.com?  Some kind of
ego boost to get him to go for it?

On the mod_rewrite, I'm not following the question.  You want the
/BillHenderson to stay in the address bar?  I tried the very first one that
came up on Dave's Google search and it leaves the original URL in the
address bar.  I'm on IE 6.

Dan

-Original Message-
From: Bill Henderson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 01, 2002 2:53 PM
To: CF-Talk
Subject: RE: Can anybody see a problem with this?


Dan - you wrote:

2) In IIS, for that directory or subdomain, go to properties and choose
the
directory tab.  Change the 'When connecting to this resource, the
content
should come from:' option to 'A redirection to a URL', and enter in the
redirect to box /people.cfm?person=$0.  (use the help on that tab to
see
other options)


I would love to do this, however, boss wants
http://www.mydomain.com/BillHenderson format only. Is there any way I
can do something close to what you suggested without straying from the
boss man's idea?

And as far as the URL rewrites, I found a IIS mod_rewrite and started
playing around with it, it looks like I can do what I need, but I need
to have that format showing in the browser's address bar. Any
workarounds?

Bill At least my nit-picky boss is a nice guy Henderson
[EMAIL PROTECTED]





__
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: Can anybody see a problem with this?

2002-08-01 Thread Sean A Corfield

On Thursday, August 1, 2002, at 03:31 , Dan Haley wrote:
 On the mod_rewrite, I'm not following the question.  You want the
 /BillHenderson to stay in the address bar?  I tried the very first one 
 that
 came up on Dave's Google search and it leaves the original URL in the
 address bar.  I'm on IE 6.

Apache mod_rewrite has the option to do a server-side rewrite (in which 
case what you type in the URL is what you see in the address bar) or force 
a redirect (in which case what you see in the address bar is the target of 
the redirect). The latter is achieved by placing [R] at the end of the 
RewriteRule.

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

__
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