Powered by coANDco UK

How to setup a rewrite rule

From How2s

Revision as of 17:35, 8 November 2008 by Emc (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Apache 2:

sudo a2enmod rewrite
/etc/init.d/apache2 force-reload

then in the .htaccess file of the folder, add the code you can obtain from the http://www.webmaster-toolkit.com/mod_rewrite-rewriterule-generator.shtml

Make sure that

AllowOverride ALL

is set in httpd.conf or the respective httpd.conf configuration file.

Troubleshooting:

  • Check the apache error log
  • Check the rewrite log
Please check out our sponsor, thanks to whom How2s.org is FREE: