Print Page | Close Window

Creating directories on the fly

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=21517
Printed Date: 29 March 2026 at 10:25am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Creating directories on the fly
Posted By: engxladso
Subject: Creating directories on the fly
Date Posted: 08 October 2006 at 12:29pm
I was wondering if it is possible to capture an http request to a page in a directory address that doesn't exist and then to create the requested directory and populate it with pages at run time.
 
More specifically is is it possible to capture an http request, say on session start in global.asa and then if on determining with script that the requested directory doesn't exist at that domain, use the file system object to create the directory and then copy generic pages from another directory to that directory before redirecting the request to the requested page.
 
If this is possible, does anyone know how long this kind of manipulation would take assuming that say a maximum of a dozen new sessions were created at  the same time.


-------------
Adso



Replies:
Posted By: dpyers
Date Posted: 08 October 2006 at 6:18pm
If your host allows it, you can use a custom 404 page to intercept 404's, examine the page request causing the 404, create the directory/files with fso, and then redirect to the newly created directory.




-------------

Lead me not into temptation... I know the short cut, follow me.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net