0

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!

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/">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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