Old 28-03-2006, 18:10   #1 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
Redirect

Here's a tricky one. I need to redirect oursite.com/blah/ to oursite.com/products/blah/.

If it were Apache, I'd use .htaccess, but it's IIS. I don't want to use meta refresh as it causes SEO problems supposedly. I don't have access to the host OS. CMS is built with ColdFusion.

Please advise.
  Reply With Quote
Old 28-03-2006, 18:18   #2 (permalink)
forwardtrends
forwardtrends.com
 
Join Date: Mar 2006
Location: Pittsburgh, PA
Posts: 67
Is there a global.asa file?
  Reply With Quote
Old 28-03-2006, 18:19   #3 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
A what?

Anywho, I finally found something:

Code:
<cfheader statuscode="301" statustext="Moved permanently"> <cfheader name="Location" value="http://www.oursite.com/products/blah/">
Solved.
  Reply With Quote
Old 28-03-2006, 18:24   #4 (permalink)
forwardtrends
forwardtrends.com
 
Join Date: Mar 2006
Location: Pittsburgh, PA
Posts: 67
Well if you aren't then create a global.asa in the root - and drop this code in:

Code:
<SCRIPT LANGUAGE="VBScript" RUNAT="Server"> Sub Application_OnStart Application("ActiveUsers") = 0 End Sub Sub Session_OnStart Session.Timeout = 5 Session("Start") = Now Application.Lock Application("ActiveUsers") = Application("ActiveUsers") + 1 Application.UnLock strsite = Request.ServerVariables("SERVER_NAME") if strsite = "http://www.othersite.com/blah" then response.redirect ("http://www.othersite.com/products/blah") end if End Sub Sub Session_OnEnd ' Decrease the active visitors count when the session ends. - filler. Application.Lock Application("ActiveUsers") = Application("ActiveUsers") - 1 Application.UnLock End Sub </SCRIPT>

You can also write out the total numbers of users on the site anywhere with:

Code:
response.write(Application("ActiveUsers"))

Last edited by forwardtrends : 28-03-2006 at 18:34.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8