: Permanent redirect domain to www subdomain without web.config 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
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!
More posts by @Gretchen104
1 Comments
Sorted by latest first Latest Oldest Best
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/">
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.