Jump to content



Photo

Proper way to handle a redirect?

active server document

  • Please log in to reply
6 replies to this topic

#1 CheckOne

CheckOne

    Neowinian

  • Joined: 01-August 09

Posted 11 February 2013 - 16:20




#2 primexx

primexx

    Neowinian Senior

  • Tech Issues Solved: 6
  • Joined: 24-April 05

Posted 11 February 2013 - 23:24

google http 301 or 302 redirects

#3 simsie

simsie

    Neowinian

  • Joined: 12-February 06
  • Location: Bedfordshire UK

Posted 11 February 2013 - 23:32

What's your web server software?

I'm going to assume IIS. For this I did it by creating 5 different sites in the same pool and then on each one there should be a way to configure a redirect in the GUI.

As for the typing www or not if you right click on each site in IIS and go to 'bindings' I think it is you can add extra domain names. I had to manually add the www on mine as well as the non-www version.

#4 +Seahorsepip

Seahorsepip

    http://seapip.com

  • Tech Issues Solved: 28
  • Joined: 23-January 11
  • Location: Netherlands
  • OS: Windows 8.1 Pro
  • Phone: Nexus 5

Posted 18 February 2013 - 15:52

use a .htacces file to redirect, it's the fastest and best way in my opinion.

#5 Sandor

Sandor

    Neowinian Senior

  • Joined: 28-November 03
  • OS: Win 8.1

Posted 19 February 2013 - 19:40

use a .htacces file to redirect, it's the fastest and best way in my opinion.


web.config might be more appropriate if it's an IIS based system...

#6 +Seahorsepip

Seahorsepip

    http://seapip.com

  • Tech Issues Solved: 28
  • Joined: 23-January 11
  • Location: Netherlands
  • OS: Windows 8.1 Pro
  • Phone: Nexus 5

Posted 19 February 2013 - 20:23

web.config might be more appropriate if it's an IIS based system...

I didn't knew it was a ISS based system :p

#7 Riva

Riva

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 11-February 07

Posted 19 February 2013 - 20:28

Best way to do this is to create an HTTP Module (http://msdn.microsof...y/ms227673.aspx) and decide where you want to redirect to in the HttpApplication.BeginRequest event then finally do the redirection in the HttpApplication.EndRequest event.