Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Environment Variables in HTML (no CGI or SSI)

Status
Not open for further replies.

fpwr

Programmer
Oct 21, 2003
95
0
0
US
Does anyone know if it is possible to display/access environment variables purely in HTML? There are numerous ways to do this with CGI scripts, Server Side Includes, ASP, Coldfusion, etc..., however, I think that I need to be able to do this purely in HTML....

We are in the process of migrating a bunch of sites to a new server and some of the URLs will be changing. I wanted to create a custom redirect page to replace the standard MS [tt]404b.htm[/tt] file that gets displayed when a page cannot be found. I want it to interpret the old link that was attempted and then display a page with the new link and a message to "update your links." I tried to do this in Coldfusion (which would be the easiest for me), however, IIS doesn't seem to execute the page as a CF page in the event of an error (it displays the page but only as HTML)....

Any ideas? Has anyone ever done anything similar? Thanks.
 
Not possible.

If you want a coded 404 page set the type to URL then it will execute the code.

Make sure that a 404 response is returned after the code has parsing script ends otherwise IIS will return a 200 response

Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Duh...thanks! That worked.

Paul.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top