Notes on mod_rewrite for Apache

Apache’s mod_rewrite document, calls this module as “Swiss Army Knife of URL manipulation!”

 

mod_rewrite is an Apache module that allows for server-side manipulation of requested URLs. Incoming URLs are checked against a series of rules. The rules contain a regular expression to detect a particular pattern. If the pattern is found in the URL, and the proper conditions are met, the pattern is replaced with a provided substitution string or action. This process continues until there are no more rules left or the process is explicitly told to stop.

 

Fig: mod_rewrite control flow.

 

Advantages

  1. mod_rewrite can be used to transform long and complex urls into user friendly or short urls.

    For eg. http://myrurl.php/customer.php?name=shan&id=4562&aadr=561

    Above url can be converted to a more user friendly one as,

    http://myurl.php/customer/shan

     

  2. Security enhancement.

    Consider the above example a potential hacker can try out different urls to hack into the system by giving different parameters and values passed to customer.php, using mod_rewrite we can prevent such threats.

     

    mod_rewrite can be enabled by uncommenting the line,

    LoadModule rewrite_module modules/mod\_rewrite.so

    in apache configuration file httpd.conf.

Quiz Builder DIY kit for iPhone

The Quizbuilder Kit is a complete, full-featured walkthrough to making your own quiz on an iPhone or iPod touch. This Kit will guide you through everything you need to know to create an iPhone app.  And the best part is that you will be able to create your own quiz within an hour. This kit consists of well commented source code and well explained control flow. With this kit, you only need questions and their correct answers to create quiz based on any topic.

You can buy this book from here http://schogini.com/shop/iphone-android-kits/66-iphone-sdk-quiz-app-kit.html

Know more about this kit at http://schogini.in/app-websites/kit-php-quiz