Wednesday, May 12, 2010

Simplest way to test mod_rewrite in Apache

Are you looking for a way to test if mod_rewrite is enabled in your Apache server? here is an easy one, create a .htaccess file in a folder like for example "www/rewrite_test_folder" with the following code in it:

Options +FollowSymLinks
RewriteEngine On

Then try to access it via http://localhost/rewrite_test_folder and you should get one of these:

- No errors, mod_rewrite engine is enabled
- 500, Internal Server Error, this means that mod_rewrite was not installed/enabled in your computer