Skip to content

How to activate the rewrite module

FiveTech Software edited this page May 6, 2020 · 4 revisions

Basically you need to do this if you don't want the .prg extension to be seen and also to route all requests through an index.prg file

  1. Edit httpd.conf

  2. Uncomment this line: (remove the # at the beginning)

LoadModule rewrite_module ...

  1. In <directory (pages location) change AllowOverride from None to All

AllowOverride All

  1. Restart Apache

sudo apachectl restart (from OSX and Linux)

Finally in the folder where your app is, create a .htaccess file with this content:

Options -Indexes
RewriteEngine On
RewriteRule ^([a-zA-Z]+)$ index.prg/?$1 [NC,QSA]

Linux users:

sudo a2enmod rewrite