- Javascript or Visual Basic code within your ASP page or
- server administrative tools (the IIS management server console, iis.msc)
Since the page I was trying to redirect was an HTML page, I wasn't able to put in any VB or Javascript code to perform the redirect. If I was using an ASP page, I could use some VB code like this:
< %@ Language=VBScript %>
< %
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”, http://www.example.com
%>
Instead, I used the IIS management console to edit the attributes of the file to permanently redirect the destination location of the file. In the example below, I have right-clicked on the Properties of a web resource available to IIS (a file under the wwwroot), have input my other blog "http://crazedmuleproductions.blogspot.com" as the destination URL and checked "a permanent redirection for this resource."

Lo and behold, this works..I am redirected to the proper location (shown below). However, when I use Firebug to inspect how the server is doing the redirects, I find that Firebug shows a "301 error" for the response code:

To confirm that it wasn't Firebug misinterpreting the response from the server, I used this site to confirm the response code:
http://www.internetofficer.com/seo-tool/redirect-check/
Using the internetofficer site's redirect checker, I found that the redirect checker showed the same response from the IIS server. So Firebug wasn't reporting incorrect information.
Finally, after a bit of googling, it seems that the "301 error" is just the way that the IIS server responds to the 301 permanent redirection setting. This is confusing, non-standard terminology, as it caused me to think that I had implemented the redirect incorrectly. Perhaps Microsoft will fix this in the future.
anyway..Happy 4th of July!
TAG
Hi Cocsod,
ReplyDeleteGood article! Thank you so much for sharing this post. Your views truly open my mind.
Hadoop map