![]() |
Simple URL Redirect |
Post Reply
|
| Author | |
jakevs
Newbie
Joined: 11 Jan 2010 Location: Marlow Online Status: Offline Posts: 2 |
Quote Reply
Topic: Simple URL RedirectPosted: 11 Jan 2010 at 12:00pm |
|
Hi guys
This is probably a silly thing to ask, but it would be useful to have it in a forum like this (especially since I don't play with our ZXTM on a daily basis) What should my traffic script look like if I want to forward requests that are sent to e.g. http://whatever.com to http://www.whatever.com? My current script looks like this:
Thanks Jake Edited by jakevs - 11 Jan 2010 at 12:16pm |
|
|
-------------------- jetNEXUS ZXTM v4.1r3 IIS 6.0 -------------------- |
|
![]() |
|
jakevs
Newbie
Joined: 11 Jan 2010 Location: Marlow Online Status: Offline Posts: 2 |
Quote Reply
Posted: 11 Jan 2010 at 12:13pm |
|
Hi again,
Some clarification on what I meant... Can I have a generic rule that I can apply to all my virtual servers (i.e. not having to specify the domain name in the rule? Thank you Jake
Edited by jakevs - 11 Jan 2010 at 12:13pm |
|
|
-------------------- jetNEXUS ZXTM v4.1r3 IIS 6.0 -------------------- |
|
![]() |
|
JonathanDade
Admin Group
Joined: 23 Sep 2008 Online Status: Offline Posts: 2 |
Quote Reply
Posted: 14 Jan 2010 at 10:28am |
|
var gaJsHost = (("https:" == document.location.protocol) ?"https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
Hi Jake,
We liked this question, here in the Layer 47 Geek Farm. So we started working on it.
What we thought was to be genuinely generic it would need to handle more than just adding the new hostname on the beginning. What if the request was SSL or if there is a query string?
Here is what we finally came up with:
I hope this helps.
< ="http://www.google-analytics.com/ga.js" =text/>
try { var pageTracker = _gat._getTracker("UA-491206-7");
pageTracker._trackPageview();
} catch(err) {}
|
|
|
Jonathan Dade
Technical Services Manager jetNEXUS Solutions |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() 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 |