How can I add Apache rewrite rules?

The apache module mod_rewrite is compiled by default into the SW-Soft Linux Apache installations. You can see this by the following line in the Apache configuration file in /etc/httpd/conf/httpd.conf :

LoadModule rewrite_module modules/mod_rewrite.so

By default the rewrite engine is off. You can turn the rewrite engine on by placing the following command in a .htaccess file that you place in the root directory for your site:

RewriteEngine On

You then can place the rewrite rules you wish to add for the site in the same .htaccess file.

You can find Apache 1.3 information on mod_rewrite at http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html.

You can find Apache 2.0 information on mod_rewrite at http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I add a user for my website in the BlueOnyx control panel?

To add a user for a website in the BlueOnyx control panel, follow these steps: Click on the...

How do I add a website in the BlueOnyx control panel?

Follow these steps to create a website in the BlueOnyx control panel: Login to the BlueOnyx...

How do I add DNS records for my hwVPS account?

The steps to add DNS records for your hwVPS account are as follows: Log into the hwVPS DNS...

How can I add a new mailbox?

To add a new mailbox follow these steps: Go to your control panel at...

Powered by WHMCompleteSolution