web development 101

I've seen so many sites recently guilty of the two most annoying (to me!) sins of web development:

ServerAlias for 'www'
Not having a http alias set up (so you can type http://blogger.com OR http://www.blogger.com to hit your site) - this one is really frustrating, as I'm usually lazy and don't type the 'www'. Quick snippet from my alternativecontext setup on Apache (as a virtual host):
<virtualhost>
ServerName alternativecontext.com
ServerAlias alternativecontext.com
ServerName www.alternativecontext.com
...
</virtualhost>
Directory Index pages
Not setting up default pages (ie index.html, index.php etc) - going to a site and seeing 'index.blah' after the domain name just annoys me! Solved in Apache by setting up the DirectoryIndex correctly, can't remember what it's called in IIS - we set it in the httpd.conf file, but can probably be overridden in virtual host configs too:
<IfModule dir_module>
DirectoryIndex index.html index.jsp index.php
</IfModule dir_module>

Comments

  1. Does the www alias cause an issue with ssl certs? Maybe a nippy redirect to your preferred address is the best bet?

    ReplyDelete

Post a Comment

Popular Posts