How can I redirect a directory on an MS Server?

Sararrikakmag

New Member
I told a friend to signup for a domain and he signed up for Windows server instead of Linux server so no MySQL, only MS SQL and thus no Wordpress. We're going to switch but since it will take up to 48 hours we want to wait until the weekend. In the meantime I'm looking for a way to redirect his entire all URLs that are from his blog /news/On the host's FAQ I found this to redirect to an SSL:http://faq.1and1.com/scripting_languages_supported/htaccess/6.html\[code\]<%EnableSessionState=Falsehost = Request.ServerVariables("HTTP_HOST")if host = "yourdomain.com" or host = "www.yourdomain.com" thenresponse.redirect("https://www.yourdomain.com/index.html")elseresponse.redirect("https://www.yourdomain.com/error.htm")end if%> \[/code\]If I were to use this ASP code but something like:\[code\]<%EnableSessionState=Falsehost = Request.ServerVariables("HTTP_HOST")if host = "yourdomain.com/news" or host = "www.yourdomain.com/news" thenresponse.redirect("http://www.yourdomain.com")elseresponse.redirect("http://www.yourdomain.com")end if%>\[/code\]Would that work to redirect traffic from currently dead blog links to his homepage?
 
Back
Top