jiangyundong2020 2020-08-16 15:45 采纳率: 0%
浏览 73

apache错误日志一直提示 .htaccess: Invalid command 'RewriteRuleEngine'

搭建个cms网站,从网上下载的源码,到本地安装的时候打不开,服务器提示500,查看apache的错误日志提示:127.0.0.1:49867] D:/www5shipin/.htaccess: Invalid command 'RewriteRuleEngine', perhaps misspelled or defined by a module not included in the server configuration.

从网上搜索答案都是:打开httpd.conf ,取消 LoadModule rewrite_module modules/mod_rewrite.so前的注释。已经打开了还是没用
.htaccess的规则看不明白,希望有大佬指点下哪里出错了

重写规则如下:

RewriteRuleEngine on

RewriteRule ^index.html$ index.php

RewriteRule ^app.html$ app.php

RewriteRule ^mv.html$ mv.php

RewriteRule ^mv_([0-9]+)_([0-9]+).html$ mv.php? mlist =$1&m=$2

RewriteRule ^tv.html$ tv.php

RewriteRule ^cx.html$ cx.php

RewriteRule ^yy.html$ yy.php

RewriteRule ^live.html$ live.php

RewriteRule ^book.html$ book.php

RewriteRule ^hall.html$ hall.php

RewriteRule ^fuli.html$ fuli.php

RewriteRule ^zhibo.html$ zhibo.php

RewriteRule ^music.html$ music.php

RewriteRule ^movie.html$ movie.php

RewriteRule ^zongyi.html$ zongyi.php

RewriteRule ^dongman.html$ dongman.php

RewriteRule ^meipai.html$ meipai.php

RewriteRule ^shop.html$ shop.php

RewriteRule ^vod(.*)$ play.php?play=$1

RewriteRule ^mvplay/(.*).html$ mv.php?v=$1

RewriteRule ^cxplay/(.*).html$ cxplay.php?id=$1

RewriteRule ^yplay/(.*).html$ yplay.php?post=$1

RewriteRule ^movie_(.*)_(.*)_(.*)_(.*)_(.*)_(.*).html$ movie.php?cat=$1&year=$2&area=$3&act=$4&rank=$5&pageno=$6

RewriteRule ^tv_(.*)_(.*)_(.*)_(.*)_(.*)_(.*).html$ tv.php?cat=$1&year=$2&area=$3&act=$4&rank=$5&pageno=$6

RewriteRule ^dongman_(.*)_(.*)_(.*)_(.*)_(.*).html$ dongman.php?cat=$1&year=$2&area=$3&rank=$4&pageno=$5

RewriteRule ^zongyi_(.*)_(.*)_(.*)_(.*)_(.*).html$ zongyi.php?cat=$1&act=$2&area=$3&rank=$4&pageno=$5

RewriteRule ^gb_(.*).html$ book.php?page=$1;

RewriteRule ^cx_(.*)_([0-9]+).html$ cx.php?cid=$1&page=$2

RewriteRule ^yy_(.*).html$ yy.php?list=$1

RewriteRule ^star.html star.php

RewriteRule ^mxstar_(.*)_(.*)_(.*).html star.php?wd=$1&tab=$2&pageno=$3

RewriteRule ^seacher-(.*).html seacher.php?wd=$1

RewriteRule ^mvseacher-(.*).html mv.php?ac=$1

RewriteRule ^news.html$ news.php

RewriteRule ^news_([0-9]+).html$ news.php?page=$1

RewriteRule ^content-([0-9]+)-([0-9]+).html$ content.php?dz=/$1/$2.shtml

RewriteRule ^shop_(.*)$ shop.php?page=$1

  • 写回答

1条回答 默认 最新

  • threenewbee 2020-08-16 17:15
    关注

    modules/mod_rewrite.so
    这个文件是否存在
    而且这个文件是linux的,windows是dll的。

    评论

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?