dongxian1699 2016-08-17 13:03
浏览 34
已采纳

.htaccess不在wamp中工作

Below is my .htaccess file which is not working locally(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 Error log says..

[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

I keep getting 500 internal Server error how to fix it?

  • 写回答

1条回答 默认 最新

  • ds122455 2016-08-17 14:22
    关注

    Issue fixed by activating rewrite engine in apache module ...

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?