-4

Having trouble with an .htaccess file on WAMP. Works on the live server, but not on the localhost. Its driving me mad. Any suggestions?

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^/\.]+)-online-help/([^/\.]+)-teacher/([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ advert.php?cat=$1&subcat=$2&type=$3&aid=$4&title=$5 [L]
RewriteRule ^([^/\.]+)-online-help/([^/\.]+)-teacher/([^/\.]+)/?$ listing.php?cat=$1&subcat=$2&type=$3 [L]
  • Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. – BitValentine Jun 11 '12 at 20:18
  • What does your server error_log say? – jman Jun 11 '12 at 20:24
  • This worked: http://stackoverflow.com/questions/3131236/enabling-mod-rewrite-on-php-ini – BitValentine Jun 11 '12 at 20:27
  • Then why don't you search on SO before posting your question? .. – j0k Jun 12 '12 at 12:03

1 Answers1

0

By default, the rewrite_module is not activated in WAMP. You have to go in the contextual menu: Apache > Apache modules > rewrite_module.

Dont forget to restart all services after this manipulation.

Jeff B.
  • 1,117
  • 3
  • 16
  • 40