Automatic Intranet "redirect"

Show off new creations, get help, or just chat about all aspects of web development and design.

Automatic Intranet "redirect"

Postby JakeParlay on Tue May 12, 2009 1:14 am

I'm working on a site hosted on our corporate intranet. I managed to get Google Analytics hooked up and working, which is nice because it's much more robust and easier to use than going through our server guys for stats.

Employees can arrive at the site by typing in their address bar:

site
or
site.mycompany.com

However, Analytics only seems to register usage on the full domain name. What's the best way to "drive traffic" to the full domain name? Any ideas?
User avatar
JakeParlay
Senior Member
Senior Member
 
Joined: Thu Dec 09, 2004 8:40 pm
Location: New England

Re: Automatic Intranet "redirect"

Postby 904 on Tue May 12, 2009 5:30 am

Do you have control over the httpd config? If so, I'd say you should be able to pull this off with a virtual host name in your httpd config (in case of apache)
904
Design Section Moderator
 
Joined: Tue Aug 30, 2005 9:26 pm
Location: Gitmo-nation Lowlands

Re: Automatic Intranet "redirect"

Postby zombie@computer on Tue May 12, 2009 5:57 pm

or a very simple solution, create a php file that redirects the user to www.yourname.com if the requested_uri = yourname
When you are up to your neck in shit, keep your head up high
User avatar
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: Automatic Intranet "redirect"

Postby JakeParlay on Tue May 12, 2009 6:01 pm

I'd love to employ either solutions, but it's a pretty restricted intranet..

I don't have any direct controls like 904 said, and php isn't installed anywhere within the company. I got it installed on one of our test environments, but they wouldn't install any of the extensions so it's pretty useless

:(

thanks anyhow, I appreciate the replies
User avatar
JakeParlay
Senior Member
Senior Member
 
Joined: Thu Dec 09, 2004 8:40 pm
Location: New England

Re: Automatic Intranet "redirect"

Postby zombie@computer on Tue May 12, 2009 6:04 pm

you can also use javascript offcourse... php is just more compatible (in case js is turned off)

put something like

<script type="text/javascript">
if (window.location=='yourdomain') window.location="http://www.yourdomain.com/";
</script>

in your page
When you are up to your neck in shit, keep your head up high
User avatar
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: Automatic Intranet "redirect"

Postby JakeParlay on Tue May 12, 2009 9:11 pm

beautiful! worked PERFECTLY
User avatar
JakeParlay
Senior Member
Senior Member
 
Joined: Thu Dec 09, 2004 8:40 pm
Location: New England

Return to Web Design & Development

Who is online

Users browsing this forum: No registered users