Taming redirects
Thursday, April 12th, 2007That’s what I’ve been doing all day. I have some experience with mod_rewrite on Apache, but not quite enough to get a website’s redirects working in little time. I’ve gone back and forth trying different combination of rewrite rules to get user-friendly URLs for a website I’m working on. The structure is made of five different pages, each of which loads chunks of text according to the selected language. For instance,
website.com/lang_1/section1/
actually points to
website.com/section1.php?language=lang1
This process is completely transparent to the end user, so even the hyperlinks use the clean URLs rather than the complex ones. This transparency also helps not to reveal the technology the website is built on, and to ensure scalability and expandability in case future developers decide to change the development framework.
User-friendly URLs are also search-engine-friendly, so it is not only in my interest to develop a site structure that is easy to grasp at first glance and to comprehend at an intuitive level, as the client has a consistent advantage if their site is easily indexed by search engines (being a company website). It is also because I prefer order over chaos (tidy URLs good, messy URLs bad), and because I need to practise programming massively if I’m going to design more often and more intensely (oh yeah) as I’m planning to be.
So, this is a great day for I tamed the mod_rewrite and I have tidy URLs to work with. I’ll post something here when the final webiste launches.