rewrite of url in same hosting space
rewrite of url in same hosting space
am 10.05.2007 22:14:20 von brown705
All:
I have a site hosted at Verio that has four different domain names
pointing to it. So when you browse to any of the four domain names,
the same site is displayed. What I would like to do is make it so
www.domain1.com is the primary URL, and if anyone browses to the site
using any of the other addresses, the address is changed to reflect
www.domain1.com.
Furthermore, I'd like it so if someone navigates to www.domain2.com/somepage.asp,
the address is changed and the path is retained, so the browser's
address bar changes to www.domain1.com/somepage.asp.
Is this possible to do when I don't have much access to the server
(i.e. Verio-hosted space)? What code can I use to do this?
Thanks,
Michael
Re: rewrite of url in same hosting space
am 11.05.2007 18:28:23 von me
"brown705" wrote in message
news:1178828060.474085.129660@q75g2000hsh.googlegroups.com.. .
> All:
>
> I have a site hosted at Verio that has four different domain names
> pointing to it. So when you browse to any of the four domain names,
> the same site is displayed. What I would like to do is make it so
> www.domain1.com is the primary URL, and if anyone browses to the site
> using any of the other addresses, the address is changed to reflect
> www.domain1.com.
>
url = "www.domain1.com" & Request.ServerVariables("PATH_INFO")
Response.Redirect(url)
> Furthermore, I'd like it so if someone navigates to
> www.domain2.com/somepage.asp,
> the address is changed and the path is retained, so the browser's
> address bar changes to www.domain1.com/somepage.asp.
>
> Is this possible to do when I don't have much access to the server
> (i.e. Verio-hosted space)? What code can I use to do this?
>
> Thanks,
> Michael
>
Re: rewrite of url in same hosting space
am 11.05.2007 19:55:10 von me
"ThatsIT.net.au" wrote in message
news:3BA61B2B-4FA7-4376-8C24-FAE40125CA32@microsoft.com...
>
> "brown705" wrote in message
> news:1178828060.474085.129660@q75g2000hsh.googlegroups.com.. .
>> All:
>>
>> I have a site hosted at Verio that has four different domain names
>> pointing to it. So when you browse to any of the four domain names,
>> the same site is displayed. What I would like to do is make it so
>> www.domain1.com is the primary URL, and if anyone browses to the site
>> using any of the other addresses, the address is changed to reflect
>> www.domain1.com.
>>
>
>
> url = "www.domain1.com" & Request.ServerVariables("PATH_INFO")
> Response.Redirect(url)
sorry that should be
url = "http://www.domain1.com" &
Request.ServerVariables("PATH_INFO")
Response.Redirect(url)
>
>
>> Furthermore, I'd like it so if someone navigates to
>> www.domain2.com/somepage.asp,
>> the address is changed and the path is retained, so the browser's
>> address bar changes to www.domain1.com/somepage.asp.
>>
>> Is this possible to do when I don't have much access to the server
>> (i.e. Verio-hosted space)? What code can I use to do this?
>>
>> Thanks,
>> Michael
>>
>
Re: rewrite of url in same hosting space
am 11.05.2007 20:09:40 von Jon Paal
unless the webhost offers something to do this, you'll probably need to place code in every page that parses out the url, performs a
replacement and a redirect .
"brown705" wrote in message news:1178828060.474085.129660@q75g2000hsh.googlegroups.com.. .
> All:
>
> I have a site hosted at Verio that has four different domain names
> pointing to it. So when you browse to any of the four domain names,
> the same site is displayed. What I would like to do is make it so
> www.domain1.com is the primary URL, and if anyone browses to the site
> using any of the other addresses, the address is changed to reflect
> www.domain1.com.
>
> Furthermore, I'd like it so if someone navigates to www.domain2.com/somepage.asp,
> the address is changed and the path is retained, so the browser's
> address bar changes to www.domain1.com/somepage.asp.
>
> Is this possible to do when I don't have much access to the server
> (i.e. Verio-hosted space)? What code can I use to do this?
>
> Thanks,
> Michael
>