简体   繁体   中英

.htaccess 500 internal server error

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.

make sure your wamp rewrite_modue is on..

in APACHE > APACHE Modules > rewrite_module

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM