automatic URL completion

  • MeineChrista
  • Beginner
  • Beginner
  • User avatar
  • Posts: 56
  • Loc: Virginia Beach

Post 3+ Months Ago

Does anyone know what this entails? I have a client who would prefer to type in 'sitename.com' in the browser title bar as opposed to 'www.sitename.com'.

Is this a coding issue or something that happens on the administrative side, like perhaps a DNS issue? If it's a coding issue, is it something that can be accomplished with vbscript, javascript and asp?

Thanks loads for your help :oops:
  • harryhood
  • Graduate
  • Graduate
  • harryhood
  • Posts: 141

Post 3+ Months Ago

That is a dns issue. The dns zone for the domain in question needs to be configured to handle requests to both the www. and non-www. domain names.
  • MeineChrista
  • Beginner
  • Beginner
  • User avatar
  • Posts: 56
  • Loc: Virginia Beach

Post 3+ Months Ago

Thanks, HH! :oops:
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

Depending on your hosting environment, it might be just a host header issue. Generally, when you configure DNS, the zone is domain.com NOT http://www.domain.com. In fact, www is an alias (A-Record) for domain.com.

In otherwords, you could configure domain.com to point to a wholly different website (IP Address) than http://www.domain.com, or foo.domain.com or anything.domain.com.

You have to configure domain.com with an IP address, and usually, the www alias is configured on the same IP.

On your webserver, you would then configure the site for domain.com and add a host header for http://www.domain.com on the same port (80) and IP address as you did for domain.com. In fact, domain.com could be just a host header itself:


123.123.123.123:80
domain.com
http://www.domain.com
whatever.site.net

You just configure domain.com and http://www.domain.com to point at the same directory on your server (that is, the same set of website files).

.c
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

Also...
You can use some server-side script (or even JavaScript) to check the current domain name, and replace it will www. if it's not there, or remove the www. if it is, depening on what you want...

999 out of 1000 times, this won't be necessary (unless your developers are making links to "http://www.domain.com/file.html" instead of "/file.html" or "../file.html") That's a poor development, except in very specific cases (I can't think of one, but there's bound to be one), so it probably doesn't apply to you.
.c
  • MeineChrista
  • Beginner
  • Beginner
  • User avatar
  • Posts: 56
  • Loc: Virginia Beach

Post 3+ Months Ago

Thanks, Carnix. I'll pass this on to the guys in the NOCH and see what they say. I appreciate it :oops:
  • s15199d
  • Expert
  • Expert
  • User avatar
  • Posts: 524
  • Loc: NC, USA

Post 3+ Months Ago

To Carnix:

I have to reply to your post...
Quote:
(unless your developers are making links to "http://www.domain.com/file.html" instead of "/file.html" or "../file.html") That's a poor development, except in very specific cases (I can't think of one, but there's bound to be one), so it probably doesn't apply to you.




I happen to work at a place where I links must be
Code: [ Select ]
www.
. I'm not defending it however. I think it's fairly idiotic (at best). But, it comes down to a decision made long ago and far far away by some old geezer that decided we should program our servers to not except domain.com . Rather our servers require
Code: [ Select ]
www.domain.com
. Very lame, and a severe pain in the azz.

So, that's when you'd have to use the
Code: [ Select ]
www.
:?
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

It's a system administrators perogative. I think it's silly.

What I was actually referring to above though was absolute vs relative links:
Code: [ Select ]
<a HREF="http://www.ozzu.com/posting.php">posting</a>

vs.

<a HREF="/posting.php">posting</a>
OR
<a HREF="../posting.php">posting</a>
  1. <a HREF="http://www.ozzu.com/posting.php">posting</a>
  2. vs.
  3. <a HREF="/posting.php">posting</a>
  4. OR
  5. <a HREF="../posting.php">posting</a>



But your point is taken. The thing is, it's more trouble to configure for the www alias. Technically, the basic domain name is what gets configured by default at the DNS level, and you have to ADD www as an extra config (most newer DNS UIs also add www by default these day).

Some people in the IT field have a hard time looking at the usability of the systems they are charged with from a moron's perspective. We (as I include myself in this next statement for sure) also tend to be very protective of our turf... which I find annoying when I'm on the other end of it... and I try to keep that in mind when confronted with someone who wants to do something with my systems...

.c
  • s15199d
  • Expert
  • Expert
  • User avatar
  • Posts: 524
  • Loc: NC, USA

Post 3+ Months Ago

Yea, I know what relative links are. I guess I just misinterprated your previous post.

You are absolutely right however...regarding the original post. Rlative links are certainly the way to go. We avoid hard-coding the whole link as much as possible.

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 76 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.