1
votes

Whenever I apply .htaccess file in my WAMP servers www folder, it shows:

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@http://www.domain.com 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

My .htaccess file is:

Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^finduser/(.*)/(.*)/$ finduser/finduserResult.php?City=$1&txtAreaRzip=$2 [L,NC]

hhtpd.conf File: I have enable the LoadModule rewrite_module modules/mod_rewrite.so.

4
is mod_rewrite enabled for apache?Marko D
So what's in the error log?leftclickben
check your apache error log, what is it saying?GiveMeAllYourCats
Your .htaccess file is fine. Try @MarkoD's suggestion. Consider wrapping your rewrite directives inside IfModule tags: <IfModule mod_rewrite.c> and </IfModule>kjetilh

4 Answers

6
votes

make sure your wamp rewrite_modue is on..

in APACHE > APACHE Modules > rewrite_module

0
votes

You need set the following settings: in htaccess

php_flag display_errors on

in php script need add

error_reporting(-1);
ini_set('display_errors', 1);

And you will get error messages

0
votes

Try do this function

RewriteEngine On 
Options All -Indexes
RewriteBase /directoryname/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

other then try do set sh4040 plugin

0
votes

Please check error log go to the directory cd /var/log/apache2 type ls -->enter. if you have an error .htaccess: Invalid comman$

than have solved this issue by running a command.

sudo a2enmod rewrite && sudo service apache2 restart