IIS Solution to URL cononicalisation

June 18th, 2007 by darrenjamieson

You wanted it, it’s here by popular demand. Use this document to explain to developers how to 301 redirect the http:// to the www.

Satisfaction, guaranteed.

If you have root access to the server your site is hosted on you can make the change in the IIS Manager. Simply remove ‘industrialmachines.net’ from HTTP Headers of the Site Profile and create a new site profile with the domain industrialmachines.net (no www.) that instead of pointing to the home directory is set as a Permanent Redirect to the domain name www.industrialmachines.net.

IIS 301 Redirect

Get the current page in VB

June 18th, 2007 by darrenjamieson

Paul asked about this, so here’s the answer to getting the current URL from your browser window into a variable.

This is all you need to get you the current page URL
<%
Thispage = Request.ServerVariables(”script_name”)
%>

Now, if your page has Querystring info and variables you want as well.
Like so “http://www.mysite,com/view_user.asp?ID=1&Name=Fred

you would use code like this.

<%
Thispage = Request.ServerVariables(”script_name”) & “?” & Request.Querystring
%>

Blog Link Bait

May 29th, 2007 by darrenjamieson

Just for posterity, the stumble over and fall down of our server was caused by this.

Beat that.

ASP Resources

May 29th, 2007 by darrenjamieson

You love ‘em, some ASP resources for you:

http://www.aspin.com
Features loads of free programs to download and use, like forums, blogs etc.

http://www.4guysfromrolla.com
Experts offering code snippets for when you get stuck, the VB Date stuff is excellent