Mod_rewrite Checking

Mod_rewrite is an Apache module installed on Linux servers by default, it does not have to be installed or enabled.

Mod_rewrite manipulates browser submitted URLs and translates them to deliver content to the browser. This process takes places entirely server-side and without the browser’s knowledge. The resulting content appears to have originated from the submitted URL, much like masking. With it you can nearly do all types of URL manipulations you ever dreamed about.

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.

If you want to check Mod_rewrite is enabled or not on your server then follow these steps,

1. In the public_html folder of your site make the test folder and in that test folder create the .htaccess file and the following code in the .htaccess file.


Options +FollowSymlinks
RewriteEngine on

And then access test folder in the browser ( If you did not get any error then Mod_rewrite is enabled on the server and If you get 500 Internal Server Error then Mod_rewrite is not enabled on the server.

2. You can check the phpinfo also.

Create a file called phpinfo.php in your public_html folder and add following code there, change the ownership and access it as and check Loaded Modules, you will found it there.

Phpinfo code;