【问题标题】:.htaccess is not working in wamp.htaccess 在 wamp 中不起作用
【发布时间】:2016-08-17 13:03:25
【问题描述】:

下面是我的 .htaccess 文件,它在本地无法运行(wamp)..

    Options +FollowSymLinks -MultiViews
    RewriteEngine On

    RewriteRule ^[a-zA-Z0-9]{40}$ search.php?hash=$1

    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 怎么解决?

【问题讨论】:

  • 查看你的apahce错误日志

标签: php apache .htaccess redirect wamp


【解决方案1】:

通过在 apache 模块中激活重写引擎解决的问题 ...

【讨论】:

    猜你喜欢
    • 2015-07-05
    • 1970-01-01
    • 2015-12-12
    • 2013-04-26
    • 1970-01-01
    • 1970-01-01
    • 2016-06-04
    • 2016-09-10
    • 1970-01-01
    相关资源
    最近更新 更多