Forum Moderators: coopster
'example code used in classic asp
Dim strQuerystring, aParameters
strQuerystring = Mid(Request.ServerVariables("QUERY_STRING"),12)
aParameters = Split(strQuerystring,"/")
On Error Resume Next
Server.Transfer(aParameters(1) & ".asp")
If Err Then
Response.Status = "404 Not Found"
Server.Transfer("error-message.asp")
End If
was that it would trigger a 404 error and in the error page i had a server.transfer function,
To the user and search engine robots it still looked like "/news/317"
Right now I don't even know where to look.
No if you set the Custom Error for 404 to be a script it will run the script before sending the header.
There is no folder with this name so the way it used to be handled in classic asp was that it would trigger a 404 error and in the error page i had a server.transfer function, which directed it to a news.asp page which would then execute the display of the news article.
No if you set the Custom Error for 404 to be a script it will run the script before sending the header.
Is this specific to Windows servers?
That is what I was trying to find out - I can do this with IIS 6 but haven't found a way of doing it with Apache yet