How to enable mod_rewrite in Helicon Ape

Hope you’ve already installed Helicon Ape and are ready to have a look at it. So, let’s start!

Run Helicon Ape Manager from Start – Programs – Helicon – Helicon Ape – Helicon Ape Manager.

To enable mod_rewrite in Helicon Ape you should simply add/uncomment the following derective in httpd.conf:

LoadModule rewrite_module  modules/mod_rewrite.so

Helicon Ape Manager

1. The easiest way to check if mod_rewrite is working correctly

Now to make sure mod_rewrite operates correctly add the following code into .htaccess in the root of your site:

RewriteRule . – [F]

Note! Don’t use this directive on live server!

Helicon Ape Manager

Now save changes to .htaccess

Helicon Ape Manager

Make any request to your site. If mod_rewrite works fine, the result will be 403 Forbidden, otherwise you’ll get 404 Page not found.

Hurrah! It works! Now let’s move on to the real example.

2. Example of basic rewrite rule

Let’s create a file, say test.asp, in the root of your site. And put the following code that will show us current date/time

Done? Then put the following rules into the .htaccess in the root of your site

RewriteEngine On
RewriteBase /
RewriteRule ^foo\.htm$ test.asp [NC,L]

Save .htaccess.

If you now request http://localhost/foo.htm, you’ll get the content of http://localhost/test.asp.

May your first steps with Helicon Ape be firm and sensible.

Sincerely Yours,
Helicon Team.

This entry was posted in Helicon Ape and tagged . Bookmark the permalink.

Comments are closed.