0

I'm new to .htaccess files, I've been watching tutorials online and everything seems perfect, but right now I'm trying to clean up the URL, so if user enters /products... he is redirected to products.php.

Here's the .htaccess code:

ReweriteEngine on

RewriteCond %{REQUEST_URI} products/
RewriteRule products/ http://localhost/website/products.php

It's too simple but driving me crazy, so any idea?

Here's the error log:

[Tue Aug 26 18:28:20 2014] [alert] [client 127.0.0.1] C:/AppServ/www/website/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Fil Gym
  • 1
  • 1
  • Check your apache error.log to see what is causing 500 – anubhava Aug 26 '14 at 16:38
  • [Tue Aug 26 18:28:20 2014] [alert] [client 127.0.0.1] C:/AppServ/www/website/.htaccess: Invalid command 'ReweriteEngine', perhaps misspelled or defined by a module not included in the server configuration – Fil Gym Aug 26 '14 at 16:41
  • 1
    That means `mod_rewrite` isn't enabled in Apache config – anubhava Aug 26 '14 at 16:42
  • 2
    Just change `ReweriteEngine on` to `RewriteEngine on` – Regent Aug 26 '14 at 16:43
  • @Regent i just did change it and here's the error again [Tue Aug 26 18:44:26 2014] [alert] [client 127.0.0.1] C:/AppServ/www/website/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration – Fil Gym Aug 26 '14 at 16:47
  • Well, all that I can suggest is to read [documentation](http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteengine) about it. – Regent Aug 26 '14 at 16:56
  • 1
    Doing a google search for "**Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration**" returns this as the first result: http://stackoverflow.com/questions/10144634/htaccess-invalid-command-rewriteengine-perhaps-misspelled-or-defined-by-a-m – Jon Lin Aug 26 '14 at 17:53

1 Answers1

0

simply , configure WAMP apache modyle :

1- left click on WAMP icon on taskbar. 2- Click Apache > Apache Modules. 3- you will find in the list "rewrite module" unchecked , check it and DONE (Y)

Fil Gym
  • 1
  • 1