Today I moved my Russian translation of W(p)GtR from Godaddy to my shiny new Linode VPS.
What I needed though, is to redirect people visiting the old site, to the new site.
My old site was running on Windows / IIS / ASP.NET so I could not use Godaddy’s Redirect URL feature in Control Panel which only works on Linux accounts.
To redirect those visitors hitting the folder (i.e. zvolkov.com/poignant_ru), I added default.asp with following content:
<%@ Language=VBScript %> <% Response.Status="301 Moved Permanently" Response.AddHeader "Location","http://www.poignant.ru" %>
This was easy. The trick was to redirect visitors to individual static .html pages — and here’s how I solved it.
Basically, you need to add a web.config to your folder with httpRedirect tag in it, like this:
<configuration>
<system.webServer>
<httpRedirect enabled="true" exactDestination="true" httpResponseStatus="Permanent">
<add wildcard="*ch1.html" destination="http://www.poignant.ru/ch1.html" />
<add wildcard="*ch2.html" destination="http://www.poignant.ru/ch2.html" />
<add wildcard="*ch3.html" destination="http://www.poignant.ru/ch3.html" />
<add wildcard="*ch4.html" destination="http://www.poignant.ru/ch4.html" />
<add wildcard="*index.html" destination="http://www.poignant.ru/index.html" />
<add wildcard="*copyright.html" destination="http://www.poignant.ru/copyright.html" />
<add wildcard="*help.html" destination="http://www.poignant.ru/help.html" />
<add wildcard="*WpGtR_rus.pdf" destination="http://www.poignant.ru/WpGtR_rus.pdf" />
</httpRedirect>
</system.webServer>
</configuration>
Works like a charm! You will notice that the site is significantly faster now.
This is because it is served by nginx, a relatively new super-speed web server.
Next week I will be moving my blogs as well.
