• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

dcs68
#1 Posted : Tuesday, December 22, 2009 6:28:41 PM(UTC)
dcs68

Rank: Member

Joined: 6/1/2004(UTC)
Posts: 720

I have a site that functions on a subdomain. If the customer inserts www before the subdomain the WildCard SSL Cert will not recognize the SSL. Is there a way the I can configure something so that anyone who types:

http://www.usa.yourticketzone.com is re-directed to http://usa.yourticketzone.com? (no "www")

Thanks,
d.



Derek Schaaf

http://www.yourticketzone.com

[url=http://www.cmcdds.com][/url]
Kman
#2 Posted : Tuesday, December 22, 2009 9:47:22 PM(UTC)
Kman

Rank: Member

Joined: 11/25/2003(UTC)
Posts: 370

Look this over. In C# but can do in VB.Net.
Just switch it around from presented form.

http://www.mycsharpcorner.com/Post.aspx?postID=40
Regards,
Kim(Kman) Rossey
www.toocoolwebs.com
BVSoftware - MerchantTribe Programming/Design, Database Programming and Business Applications
[email protected]
dcs68
#3 Posted : Tuesday, December 22, 2009 9:59:49 PM(UTC)
dcs68

Rank: Member

Joined: 6/1/2004(UTC)
Posts: 720

Thanks Kim,

Would this go in the global.asax file?

Thanks,
d



Derek Schaaf

http://www.yourticketzone.com

[url=http://www.cmcdds.com][/url]
Customizer
#4 Posted : Tuesday, December 22, 2009 10:46:28 PM(UTC)
Customizer

Rank: Member

Joined: 9/26/2008(UTC)
Posts: 121

Hi Derek,
I think adding redirect directive to page load event of App_Code/BaseStorePage.vb will do the job. So the code will look like:


Code:

if request.Url.AbsoluteUri="http://www.usa.yourticketzone.com" then
response.redirect("http://usa.yourticketzone.com")
end if

Hope this helps.
http://www.software-development-innovations.com - affordable web customization and development service
dcs68
#5 Posted : Wednesday, December 23, 2009 10:50:12 AM(UTC)
dcs68

Rank: Member

Joined: 6/1/2004(UTC)
Posts: 720

thanks...I will give that a shot!



Derek Schaaf

http://www.yourticketzone.com

[url=http://www.cmcdds.com][/url]
dcs68
#6 Posted : Wednesday, December 23, 2009 10:59:29 AM(UTC)
dcs68

Rank: Member

Joined: 6/1/2004(UTC)
Posts: 720

sorry, where exactly within the basestorepage.vb file would it go?

Thanks for your help!
Derek



Derek Schaaf

http://www.yourticketzone.com

[url=http://www.cmcdds.com][/url]
Customizer
#7 Posted : Thursday, December 24, 2009 3:51:51 AM(UTC)
Customizer

Rank: Member

Joined: 9/26/2008(UTC)
Posts: 121

Try to place it beneath the:
[2]

Code:

Protected Sub BasePage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


[/2]
[2]
[/2]
http://www.software-development-innovations.com - affordable web customization and development service
Customizer
#8 Posted : Thursday, December 24, 2009 3:54:44 AM(UTC)
Customizer

Rank: Member

Joined: 9/26/2008(UTC)
Posts: 121

Also to avoid Caps locks typing problem like http://www.Usa.yourticketzone.com it's better to add such code instead of one I provided:


Code:

if request.Url.AbsoluteUri.ToLower()="http://www.usa.yourticketzone.com" then
response.redirect("http://usa.yourticketzone.com")
end if
http://www.software-development-innovations.com - affordable web customization and development service
dcs68
#9 Posted : Thursday, December 24, 2009 11:22:34 AM(UTC)
dcs68

Rank: Member

Joined: 6/1/2004(UTC)
Posts: 720

excellent, thank you!!



Derek Schaaf

http://www.yourticketzone.com

[url=http://www.cmcdds.com][/url]
dcs68
#10 Posted : Thursday, December 24, 2009 11:33:20 AM(UTC)
dcs68

Rank: Member

Joined: 6/1/2004(UTC)
Posts: 720

Hi Customizer,

I tried both versions inserted directly below the :

Protected Sub BasePage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

and neither seemed to work. I will continue testing.

Thanks,
Derek



Derek Schaaf

http://www.yourticketzone.com

[url=http://www.cmcdds.com][/url]
Customizer
#11 Posted : Thursday, December 24, 2009 11:03:22 PM(UTC)
Customizer

Rank: Member

Joined: 9/26/2008(UTC)
Posts: 121

Oh, think I found the problem. Webserver puts the page name after domain name even if it was not specified so this should work:


Code:

if request.Url.AbsoluteUri.ToLower().Contains("[url=http://www.usa.yourticketzone.com]http://www.usa.yourticketzone.com[/url]") then
response.redirect(request.Url.AbsoluteUri.Replace("http://www.usa.yourticketzone.com","http://usa.yourticketzone.com") )
end if
http://www.software-development-innovations.com - affordable web customization and development service
dcs68
#12 Posted : Friday, December 25, 2009 9:41:52 AM(UTC)
dcs68

Rank: Member

Joined: 6/1/2004(UTC)
Posts: 720

Excellent!!! Thanks Customizer...that did the trick : )

Have a great Christmas!

Derek



Derek Schaaf

http://www.yourticketzone.com

[url=http://www.cmcdds.com][/url]
Customizer
#13 Posted : Saturday, December 26, 2009 2:38:38 AM(UTC)
Customizer

Rank: Member

Joined: 9/26/2008(UTC)
Posts: 121

You are welcome.

Have a nice Christmas.
http://www.software-development-innovations.com - affordable web customization and development service
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012