How can I enable Mod-Rewrite Module?

In order to enable Mod_Rewrite for your site you should create a text file called .htacccess in the directory where you wish the rewrite rules to apply.

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

Many applications come with ready to use rewrite rules that can be found in a file called htaccess.txt.

Was this answer helpful?

 Print this Article

Also Read

How do I configure my desktop's mail client with an email account?

A mail client is an application you use to check your email. The mail client can be either web...

Stats not updating!

We allow our customers to update the stat by themselves. So login to your AWSTATS and click on...

How do I auto-redirect my web pages?

Redirects are used when you want to point a specific url or web page to another location. For...

How to deploy Tomcat WAR file in cPanel server?

Here is the tutorial how to deploy WAR file: STEP-1) Build your web app suppose example.war; Now...

HTTP Error Codes !

400 Bad Request The user’s request contains incorrect syntax.   401 Unauthorized The...