Notes from Daily Encounters with Technology RSS 2.0
 
# Thursday, January 19, 2006

The problem is pretty straightforward: the web site redesign causes the structure to change, thus the old addresses become invalid. Since you don’t want the users to get the dreaded error 404: Object not found, there are a couple of options available to you (if you’re using IIS – Internet Information Services, that is).

You could just change the error page to match the style of your web site and inform the visitor about the now missing page or just make the redirection to your new starting page. This is a bit unfriendly to the visitors if you kept the old content since they have to find it themselves. It would certainly be better to redirect them directly to the new address of the old content. But still it’s not a bad idea to do this. It’s an easy way to keep the users on your website even when they encounter invalid URLs by whatever reason. Just open up the Custom Errors tab of the virtual directory or web site properties and set the desired URL for the error 404. But don’t forget that you have to enter the complete path starting from the root of the site, for example: "/mydirectory/myurl.html".

If you want to make a different redirection for each page you could just keep the old pages but instead of having any actual content they would just make a redirection to the correct new address. This solution has two problems:

  • It’s difficult to maintain if you have many pages.
  • You’re stuck with the client side redirection, i.e. meta refresh tag.

To make the redirection server side you could use the redirect options on the Home Directory tab of the virtual directory or web site properties. But they have some serious limitations and tend not to work as expected, even more so because the documentation doesn’t explain them very well. But there’s no reason to worry, I have a better solution for you. Setup a special 404 URL on the Custom Errors tab as already suggested. But this time use an asp or aspx page for it. The supplied query string (Request.QueryString) contains the missing URL which you can parse out and use to determine the correct new address corresponding to it. For a few pages a simple select or switch clause will do but nothing prevents you from having the mappings stored externally, in a special file or a database table for example. All that’s left is to make a Response.Redirect to the new address.

There’s one more thing to take care of. If you moved your site to a new subdirectory and chose the last suggested solution, don’t forget to setup a similar simple starting page which just redirects the visitors to the new starting page. Trying to open the site without this page will namely cause an error 403: Forbidden, because a directory listing will be attempted which you have (hopefully) prevented.

Thanks go to Peter Forret for some of the ideas I used to make this work when redesigning my page.

Thursday, January 19, 2006 11:35:50 PM (Central European Standard Time, UTC+01:00)  #    Comments [1] - Trackback
Development | ASP.NET | Software | Windows
# Sunday, January 15, 2006

It's been almost three years since I last updated my web page and it's really about time to change that. When thinking about the reasons for not updating the page in such a long period it became obvious that the old structure of the page just didn't suit the contents I'd like to publish any more.

Instead of just restructuring it and writing some code for simpler updating I decided to use an existing solution for content management. After trying out a few of free ones I chose dasBlog since this site is about to become a sort of technology oriented blog. In the last few weeks I prepared a new theme to resemble my old web page style as much as possible. I also did my best to keep relevant old content and even make it accessible through old URLs. Some of the technical details will be the subject of another posting.

But the most important thing is that I'll try to keep the updates more regular. Simpler updating and more spare time because I've just obtained my Master's degree should make this more probable. Expect mostly technical articles related to my work and spare time activities from now on.

Sunday, January 15, 2006 11:12:16 AM (Central European Standard Time, UTC+01:00)  #    Comments [1] - Trackback
Personal | Website
# Monday, March 03, 2003

Recepti screenshotI wrote this program because I was unsatisified with available programs for managing the personal recipe collection. I wanted to have nice printouts, extensive search capabilities and simple entering of new recipes. A Slovenian user interface was also important.

Because I found nothing that would suite my needs I wrote this program myself. The recipe collection is stored in the database, the interface makes editing, searching and printing simple. The collection is organised in a two level tree hierarchy, preentered ingredients, measurement units and recipe sources make entering recipes quicker.

The program is based on existing Microsoft technology: database management system (Access and MS SQL Server / MSDE are supported), ADO for database access, Internet Explorer user control. Rapid application development tool Visual Basic was used to bind all this technology into one application. The downside of the technologies used are the requirements to have all of them installed on the client computer. Most users should already have them but just in case all the above mentioned technologies link to their downloads.

The program only has Slovenian user interface, therefore it will be of limited use for those who don't speak it. The program probably won't be developed any more.

Monday, March 03, 2003 12:33:21 PM (Central European Standard Time, UTC+01:00)  #    Comments [1] - Trackback
Downloads | Windows
Recepti.exe (978.89 KB)
# Saturday, February 09, 2002

This project demonstrates the use of machine learning methods (genetic algorithms and nearest neighbours algorithm in particular) in real time navigation in unknown environment with given constraints. Apart from complete implementation with Delphi sources included (detailed explanation below) the project also features lots of interesting ideas in regard to attributes collection needed for such a navigation.

For the needs of the project I have developed the simulation environment (simulating the movement of an agent in a 2D map) with a nice GUI and a built-in editor with map managment that could be of use even for other projects. More specific is a very flexible object oriented implementation of the genetic algorithms and a simple implementation of basic nearest neigbours algorithm. All the source code is nicely organized and layed out and as such suitable for reuse and extending.

The archive also contains some sample data which directly demonstrates the really impressive results that where achieved with these methods and a quite extensive technical report which is unfortunately written in Slovene as I had to submit it at university. The source code should be completely useable even without understanding this document but you'll of course miss some of the explanations.

Saturday, February 09, 2002 12:48:23 PM (Central European Standard Time, UTC+01:00)  #    Comments [0] - Trackback
Downloads | Articles | Sources
RTNavigation.zip (354.59 KB)
# Tuesday, January 01, 2002
During the Computer Vision course at university I designed a small program that recognises time from images of a particular analog clock. With minor changes the program could be adapted for images of any analog clock. The application is written in Delphi for Win32 platform.
 
The program along with sample images and complete source code is available for download. It might be of interest to those who would like to take a look at an implementation of some of the classic computer vision algorithms. To achieve the time recognition I had to implement linear filtering with image convolution, an approximation to the Canny edge detector and two adaptions of Hough transform for recognition of circles and clock hands.
Tuesday, January 01, 2002 1:22:45 PM (Central European Standard Time, UTC+01:00)  #    Comments [0] - Trackback
Downloads | Sources
TimeRecognition.zip (538.07 KB)
Sponsored Ads

About Me

Damir Arh

Microsoft Certified Professional

View Damir Arh's profile on LinkedIn

Profile for ExAmigan

ExAmigan

Twitter
Damir's Corner: Avoiding Queue Starvation in CruiseControl.NET http://goo.gl/fb/G52YB 1 day ago
RT @aleksj: From http://last.fm/robots.txt: Disallow: /harming/humans, Disallow: /ignoring/human/orders, Disallow: /harm/to/self #asimov 2 days ago
Eagle Eye on DVD was a pleasant surprise. It passed under my radar when it was first released. 5 days ago
Multiple RTM gadgets in iGoogle suddenly can't show different lists anymore http://digs.by/aD5AbJ 6 days ago
Notifications for new projects in CCTray are a nice new feature of #ccnet 1.5 7 days ago
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

All Content © 2010, Damir Arh, M. Sc. Send mail to the author(s) - Privacy Policy - Sign In
Based on DasBlog theme 'Business' created by Christoph De Baene (delarou)