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.

If you have problems with mod_rewrite, you may ask your web host for assistance. You can always count on SiteGround's Support for such problems.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Leverage Browser Caching for Images, CSS and JS

To leverage your browser's caching generally means that you can specify how long browsers should...

Enable gZIP via .htaccess

To enable gZIP for your text, html, JavaScript, CSS and XML add these files to your .htaccess:...

Last-modified Header Explained

The last-modified header is an HTTP header that tells your browser when was the last time the...

How to change my document root folder using an .htaccess file?

By default your website is loaded from the public_html folder of your account. The public_html...

How to enable Mod_Gzip

Mod_Gzip is an external extension module for Apache 1.3 web servers implemented to help with size...