I have this .NET website, with an SSL. But when I try to see the Blackberry version of this site, the following message appears on my blackberry screen.
"HTTP ERROR 403 FORBIDDEN" "You're not authorized to view this page. Please try loading a different page". It gives you two options then: "OK" and "DETAILS" Once I click on "Details" it brings me to the mobile version of the site correctly.
Is there anything I could do to avoid having this problem on the Blackberry Site ? I just want to write on blackberry browser: http://nameofthesite.com and it should take me to the mobile version with secure connection...without sending that error.
And my redirectssl.html file (the one that redirects the non-mobile version) is written with the following source:
<HTML>
<TITLE>Redirect to Secure Site</TITLE>
<script language=javascript>
self.location = "https://www.nameofthesite.com"
</script>
<noscript>
<META HTTP-EQUIV=Refresh CONTENT="1; URL=https://www.nameofthesite.com">开发者_如何学JAVA
</noscript>
<B>This site requires SSL. Redirecting...</B>
<BR>
<BR>
If you are not redirected immediately, please click <A href="https://www.nameofthesite.com">here</A>
</HTML>
This should be done on the server side using proper HTTP redirect status codes.
Firstly most older phones simply wont deal with the javascript. Secondly this is just plan bad practice to make a browser download an HTML page to deal with HTTP redirects it is ugly and makes for very hard to maintain and understand code later on.
精彩评论