.htaccess 在 wamp 中不起作用
.htaccess is not working in wamp
下面是我的 .htaccess 文件,它不能在本地工作 (wamp)..
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteRule ^[a-zA-Z0-9]{40}$ search.php?hash=
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index($|\ |\?)
RewriteRule ^ /%1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L,NC]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]
ErrorDocument 404 /pivr/error.php
<Files .htaccess>
order allow,deny
deny from all
</Files>
Apache 错误日志说..
[Wed Aug 17 21:00:33.766183 2016] [core:alert] [pid 5780:tid 900] [client ::1:50180] C:/wamp/www/search/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
我一直收到 500 internal Server error
如何解决?
问题已通过激活 apache 模块中的重写引擎解决...
下面是我的 .htaccess 文件,它不能在本地工作 (wamp)..
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteRule ^[a-zA-Z0-9]{40}$ search.php?hash=
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index($|\ |\?)
RewriteRule ^ /%1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L,NC]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]
ErrorDocument 404 /pivr/error.php
<Files .htaccess>
order allow,deny
deny from all
</Files>
Apache 错误日志说..
[Wed Aug 17 21:00:33.766183 2016] [core:alert] [pid 5780:tid 900] [client ::1:50180] C:/wamp/www/search/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
我一直收到 500 internal Server error
如何解决?
问题已通过激活 apache 模块中的重写引擎解决...