How can I enable Mod-Rewrite Module?

n 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.

 

  • 4 Users Found This Useful
這篇文章有幫助嗎?

相關文章

How To Install IonCube Loader in WHM/Cpanel

Check this online tutorial:...

Configuring your own cPanel DNS Server

Configuring your own DNS Server with cPanel+WHM is really easy and recommended if you wish to...

How to Install APF Firewall for cPanel

Rather than using CSF firewall recommend using APF (Advanced Policy Firewall) because of its...

How to install Image::Magick in cPanel server

It is easy to install iMageMagick in your QuickWeb cPanel server (VPS or Dedicated Server only)...