JunglesMcBeef
Programmer
- Sep 18, 2003
- 266
Hey,
I'm pretty new to the whole web development side of things. Now, the problem is, i have the code, i just need a page property (the URL) to continue. Here is my code:
What I am trying to achieve is a script that will redirect to different sites hosted on a domain based on the URL entered out of many possible URLs that resolve to the main hosting page. eg xxx.com.au entered as a URL will navigate to the zzzZzzz.com.au site, as will yyy.com.au. I want to redirect those URLs entered to the appropriate subfolder on the hosted site. hmm do i make any sense at all.
I'm pretty new to the whole web development side of things. Now, the problem is, i have the code, i just need a page property (the URL) to continue. Here is my code:
Code:
<script runat="server" language="VB">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim NewURL as String
'This bit is where i don't know how to get the URL
'eg
'NewURL = some.thing.here.....
If NewURL <> "mainURL" Then
Response.Status = "301 Moved Permanently"
Response.AddHeader("Location", "NewURL")
End If
End Sub
</script>
What I am trying to achieve is a script that will redirect to different sites hosted on a domain based on the URL entered out of many possible URLs that resolve to the main hosting page. eg xxx.com.au entered as a URL will navigate to the zzzZzzz.com.au site, as will yyy.com.au. I want to redirect those URLs entered to the appropriate subfolder on the hosted site. hmm do i make any sense at all.