Forum Moderators: open
A files called test.asp containing:
<%
Response.Write "<h1>Hello World</h1>"
%>
will write a file back with the proper http header that will display Hello World in whatever font and size your browser defaults to for the h1 HTML tag.
I would use an asp processing page to create a .html file on the fly and serve it to the browser without using the File System Object to create a physical file.
So the file would exist only in the clients browser and not on the server.
I know it is a strange question. I know how to dynamically create existing asp pages. I just want to know if you can create a ghost page in asp.
ASP code kicks in & generates content.
Content, appearing to be page.html, streams to browser.
Or to put it another way, the user & search engines think it's a normal .html file.
You can either:
Setup a error document:
Your host can do this easily, essentially you dont ever create a file named page.html, when the server figures out it cant find the page, it(the server) instead serves up an error document. This error document can be an ASP file if you wish, and has no functional differences, apart from the fact that visitors(+spiders) think they are looking at page.html.
-or-
If you have server access,
you just need to associate .html files with the asp interpreter. The latest version of ASP (not .net) can process straight HTML files much quicker than previous versions, so you wont experience any resource drain doing this (ok a little to call the interpreter, it's minimal).
Or start hosting on a linux box with ChilliASP + use mod_rewrite.
HTH,
Dw