Tuesday, September 10, 2013

URL Rewriting A Brief Introduction

Hello everyone,
these days you see many urls on different sites shown as some shortened random text. We may call them shortened urls which are made to function correctly by using URL Rewriting on the server on which the target website is hosted. This is just one example where URL rewriting is used. Many other usages are also there. Let's have a brief introduction of this technique below.

URL Rewriting A Brief Summary


First of all, you should know its definition.
URL rewriting is the process of altering (often automatically by means of a program written for that purpose) the parameters in a URL (Uniform Resource Locator). It allows you to completely separate the URL from the resource.
Suppose the website is at http://www.abc.com/a/b/index.html. You want to hide the path a/b/, i.e., you want the url to be http://www.abc.com/, then this can be achieved through this technique.


How to Rewrite URLs

Implementing URL rewriting on a website depends on the Web server.
  • For example, Apache usually comes with the URL rewriting module, mod_rewrite, already installed.
  • Windows IIS requires installation of ISAPI Rewrite module.
  • Mostly it is done by editing .htaccess files on the server. There are some rewrite rules to make the things work. Well you can find the complete guide to rules to edit .htaccess and Rewrite Engine rules on the web. There are many sites available for this.
Thanks for reading the post, hope you may have got some insight into URL Rewriting.

No comments:

Post a Comment