How To Enable Mod_rewrite Module ?

Based on a regular-expression of a parser the mod-Rewrite module uses a rule-based rewriting engine which is used to rewrite the requested URLs at server level.  A rewrite engine is a software that modifies a web URL’s appearance (URL rewriting). Rewritten URLs (sometimes known as short, fancy URLs, or search engine friendly – SEF) are used to provide shorter and more relevant looking links to web pages. It is also designed to support unlimited number of protocols (rules) and an unlimited number of attached rule conditions for each rule, to provide a really flexible and powerful URL manipulation mechanism. In order to enable Mod_Rewrite for your site you should create a text file called .htacccess in root directory where you wish the rewrite rules to apply.

Lets see How to enable Mod-Rewrite Module and The first line of this text file should be:

RewriteEngine On

After that you can place your rewrite rules. Here are some examples for Joomla’s SEF option:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (/|.htm|.php|.html|/[^.]*)$ [NC]
RewriteRule ^(content/|component/) index.php

Some applications already have ready to use rewrite rules that can be found in a file called htaccess.txt. But if you have problems with mod_rewrite, you may ask your web host for assistance or raise a ticket. Tech people working at Bodhost  web hosting service provider have enough knowledge to solve any query in a short time and with expected results.

Powered by BetterDocs