On 20 Jan 2012, at 02:45, Aparajita Fishman wrote:
> If you are showing a custom 404 page, then ultimately does it matter what the
> status code is?
The customer has politely requested that pages be returned with the appropriate
status code so that search engine's view of the site is as consistent as
possible with the user's.
With a status 200, for example, the odd 404 page can turn up in the search
results (although we go to great lengths to return 303 redirects for legacy
links) Also, it messes with the rankings and generally confuses the search
engines as to the site's real structure if rogue URL's are verified as genuine
by the web server.
> You can thank Microsoft for this. IE6 refused to show a custom error page
> with a status code other than 200.
But Active 4D's own 404 page gets server with a status code of 404 (although I
see custom ones get a 200).
Here are the things I am currently trying to address as carefully as possible:
[1] - currently when I place "set response status(404)" in the custom 404 page
code, it invokes a syntax error as follows:
fusebox.head.write, Line 3
if (_request{"__fusebox.head__"}{$key} # "")
An operation on incompatible types was attempted (expected a numeric
expression)
[2] - when a URL is passed which contains a bad circuit name, the Active4D
framework does not throw an http error but a syntax error in the fusebox core
(Line 78). (You can also observe this behaviour in the Active4D demo).
I currently deal with this in the syntax error handler by filtering error
descriptions which contain the phrase "could not find the circuit" and from
there calling the 404 page instead of the error handler. The code looks like
this (custom error handler for syntax errors):
if( IsErrorCxNotFound ($errMSG) | ($errMSG="") )
include("error_http.a4d")
else
fusebox.handleError("home.handleError")
end if
What would be good regarding the behaviour of "set response status" is if it
simply set the response status and did nothing more - then I could give the
customer the option of supporting IE-6 or not (They may be more interested in
having the response codes served correctly than supporting IE6 since they can
measure the proportion of their audience accessing with IE6).
Regards
Peter
_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://vasudev.aparajitaworld.com/archive/active4d-dev/