Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've just set up a site via 1and1 and have run into an issue, I want to accomplish the simple task of redirecting the root domain to the www sub domain however due to complications I cant seam to find a way to get it to work.

I'm on a Microsoft (asp.net) package so can't use .htaccess, also the IIS server they have doesn't have the URL redirect module installed (so can't use <rewrite> in web.config).

They have built in HTTP forwarding options however if I set the root domain to redirect to the www sub domain it just infinitely redirects.

Hopefully there is some obvious option/method I've missed during the past two days of searching!

share|improve this question

1 Answer 1

You can redirect using VBScript

<%@ Language=VBScript %>
<%
' Permanent redirection
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "http://www.domain.com/"
Response.End
%>

You can also use JavaScript

<script type="text/javascript">
    window.location.href='http://www.domain.com/';
</script>

Or finally redirection with META Refresh HTML

<meta http-equiv="refresh" content="0;url=http://www.domain.com/">

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.