This is just a short post to let you know that I am now a Microsoft Hero ![]()
Two days. Two days of massive fighting with Apache and with .htaccess but I ended up winning this fight (and eventually the battle as well). I will give a simplified version of the problem, it’s enough to understand what was going on.
I was trying to create SEO URLs with the help of Apache’s mod_rewrite and .htaccess. Now consider the following URL:
http://www.example.org/article.php?id=2341
Not the most search engine optimised URL, right? What we would like to create from this looks like this:
http://www.example.org/article/2341/
Here’s a simple diagram how the mod_rewrite works:

It’s pretty straigthforward. Firstly we need to create a .htaccess in the folder where we have the examples. If you run Apache server on your machine then create a folder under the www (/var/www under Linux) directory, and name it ’seo’.
To see the folder you will need to enter http://localhost/seo/ into your webbrowser.
Now create a .htaccess file in your seo folder and add the following to it:
1 2 3 | RewriteEngine on RewriteBase /seo RewriteRule ^articles/([0-9]+)$ articles.php?id=$1 |
Create another file and name it articles.php and copy the following to it:
1 2 3 4 | <?php $iId = $_GET['id']; echo 'You have selected article id #' . $iId; ?> |
Before running this example don’t forget to enable the mod_rewrite option for Apache. To do this (or to check whether you have this module enabled) open your httpd.conf file and find the following line
1 | LoadModule rewrite_module modules/mod_rewrite.so |
If there is a #sign before it remove it (uncomment it). Don’t forget to restart your Apache server to enable your settings!
Now go to your browser and open the page http://localhost/seo/articles.php. You should see a screen which says “You have selected article id #”. Change the URL to http://localhost/seo/articles.php?id=2341
Now you should see exactly the same:
And now the moment of truth, enter http://localhost/seo/articles/2341 to your browser’s address bar (no trailing slash!). There are two kind of people now. The ones who see the same output as before, or the ones who see “You have selected article id #”. The ones who get an empty id should read on.
I did an exhaustive research on this topic, what could go wrong? For some strange reason, when Apache sees /articles/ it automatically loads articles.php. And this why the id is not displayed as only the articles.php gets invoked, without any parameter. I can tell you now that the error is not in .htacccess but in Apache’s configuration file, httpd.conf.
I run AppServ on my machine. I asked a friend of mine to run the previously mentioned scripts, he had no problems running it. I asked him to send over his httpd.conf file. Shockingly, there were differences in my version and in his (he runs WampServer). I simply copied the 2 relevant sections over and the RewriteRule started work like charm.
Open your httpd.conf file and find the following lines (yours might be sligthly different):
1 2 3 4 5 6 7 | <Directory /> Options FollowSymLinks ExecCGI Indexes AllowOverride None Order deny,allow Deny from all Satisfy all </Directory> |
Rewrite this to:
1 2 3 4 5 6 7 | <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow allow from all Satisfy all </Directory> |
Find this in your file (again, yours might be a bit different):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | <Directory "C:/AppServ/www"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks MultiViews ExecCGI # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All # # Controls who can get stuff from this server. # Order allow,deny Allow from all </Directory> |
And rewrite it to:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | <Directory "C:/AppServ/www"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All # # Controls who can get stuff from this server. # Order Deny,Allow Allow from all Allow from 127.0.0.1 </Directory> |
And yet again, don’t forget to restart your Apache server before testing the modifications! This solved the problem for me, I hope you find this solution useful.
News are spreading fast, Ryanair will suspend it’s booking service for 4 (that is four) days! Due to the new Office of Fair Trading rule, airlines are obliged to show their air taxes to customers.
For reasons unknown Ryanair will make these changes (even weeks later then the original deadline) while their booking system is offline. They won’t take any bookings online nor through their phone systems. As pointed out in the the article, they might have just as well place a link on their frontpage to easyJet.com.
Is it just another IT project failure? Might be so. It is clear that Ryanair didn’t plan this well and as Deri Jones (CEO of web application testing specialist SciVisum) says:
Ryanair are not stupid, so there must be some logic to this excessive downtime. It is possible that careful cost management - one of their trademarks - has resulted in under-delivery online, and they are simply paying the price for not having planned and executed better on this change
If people hear the word “database” they immediately think about large scale systems, server rooms, millions of rows of data, multiple tables and so on. The fact is, databases are somewhat like that.
Currently we are witnessing increasing demands for mobile computing (wireless, mobile). The rapid growth of mobile phones, PDAs, laptops means more people working on the road, more people working from home. Sooner or later, users would like to have any data, accessable at anytime and anywhere (especially mission-critical data). This is where mobile databases come into the picture. Bare in mind that businesses face a lot of problems trying to implement mobile databases which include: privacy, security and costs.
A database that is portable and physically separate from the corporate databse server but is capable of communicating with that server from remote sites allowing the sharing of corporate data.
The components of the mobile database environment include:
- corporate database server and DBMS that manages and stores the corporate data and provides corporate applications;
- remote database and DBMS taht manages and stores the mobile data and provides movile applications;
- mobile database platform that includes laptop, PDA, or other internet access devices;
- two-way communication links between the corporate and mobile DBMS.
Depending on the requirements of the mobile applications, the user of the device might log on to the corporate database and work with data there or download the necessary data onto the device that he is using. In this case the data synchronisation will take place later.
The mobile database can either do short periodic connections to the corporate database (e.g. while downloading data) or have an ongoing direct communication.
The additional functionality required of the mobile DBMSs include:
- communicate with the centralised database server through modes such as wireless or Internet access;
- replicate data on the centralised database server and mobile device;
- synchronise data on the centralised database server and mobile device;
- capture data from various sources such as Internet;
- manage data on the mobile device;
- analyse data on a mobile device;
- create customised mobile applications.
My opinion is that mobile databases will evolve as there is a higher and higher increase for mobile access. The only problem that I feel with this method is the privacy of the corporate data. Sending critical information and data about an organisation through databases might hold some risks.
[Ref: Thomas Connolly & Carolyn Begg: Database Systems: A practical approach to design, implementation and Management)
I always had this problem with my Firefox web-browser. Whenever I was running it for a long time, it suddenly hung and the only solution that brought it back to life was a pure and solid click on the “end process” button. Some weeks ago I really had enough of it and I thought I would run a search on this, hoping to find a solution. And luckily I did. This website explains how to fix the Firefox memory leak. Let me summarise the article:
- Type about:config into your address bar in Firefox.
- Create a new integer value (right click, new > integer). Name it as browser.cache.memory.capacity and give a low number for its value (Save it afterwards)
- Search for the value browser.cache.disk.capacity and set its value to 15000 if you are using 1G of RAM.
- Search for network.prefetch-next and set its value to false.
I think this should solve the memory leak, however on the website I have just recommended you can read about some more solutions as well. Happy hacking Firefox ![]()