>- see footer for list info -<
Hi Allan
I did something like this on IIS recently - I had to tell IIS to 'forward'
404 error requests to a cfm page for processing. To do this (at least in
Windows XP) you need to open a management console - Start --> right click on
'My Computer' --> Manage --> expand services and applications --> expand IIS
--> drill down to your website (default web site in my case)--> right click
--> select properties.
In the dialog, select the custom errors tab and scroll down to 404,
highlight and click 'edit properties'. Instead of file, use a URL message
type and forward the request to a CF template (you can use a path relative
to the site root). The 'bad' URL is appended to the URL so you can work out
where it's going
Here's the code from '404.cfm' - the template in the site root that I
forwarded request to....
<cftry>
<!--- Find the duff URL - include in the query string for an error
call --->
<cfset duffUrl = listLast(cgi.query_String,";")>
<!--- remove the site root.. --->
<cfset pathFromRoot = replaceNoCase(duffUrl,request.webroot,"")>
<cfif left(pathFromRoot,1) eq ":">
<!--- Port no. in URL, so need second token --->
<cfset flag = listGetAt(pathFromRoot,2,"/")>
<cfelse>
<cfset flag = listFirst(pathFromRoot,"/")>
</cfif>
....
<cfcatch>
<!--- Error - use the standard 404 --->
<h1>Page not found</h1>
<h3>The requested resource could not be found on this
server</h3>
</cfcatch>
</cftry>
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Allan Cliff
Sent: 20 March 2006 10:32
To: [email protected]
Subject: [CF-Dev] Creating a web directory
>- see footer for list info -<
Morning All,
I am creating a directory in which there will be a directory structure per
category.
i.e. http://www.mydirectory.com/technology/internet/coldfusion/ etc
There will be several hundred folders to create each with its index.cfm
inside.
Now I was thinking that maybe as each index.cfm calls exactly the same file
with the same custom tag inside that I could in effect have no folders or
files and make each call to the missing.cfm file.
Now I have tried it and it works fine but obviously I get a 404 error for
each file. Is there anyway to alter this? <CFHEADER>?
How can I output / test what my page status code is?
Also I want my page to be read correctly by the Search Engines, can anyone
see any problems?
Thanks,
Allan
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<