0

Hi I am trying to remove the .php extension from the url . For that I am following this tutorial remove .php extension . But when I add the .htaccess file to the directory , 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, 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.

My .htaccess file is :

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]

Whats wrong?

NB: I am testing all my files in WAMP server.

4

3 に答える 3

0

下の行の前を削除#します。

編集前

#LoadModule rewrite_module modules/mod_rewrite.so

編集後

LoadModule rewrite_module modules/mod_rewrite.so
于 2013-10-18T16:12:49.630 に答える