.htaccess错误的错误500 [英] error 500 for .htaccess error

查看:76
本文介绍了.htaccess错误的错误500的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行LAMP服务器,而该.htaccess给我500错误。这是过滤关键字并重定向到相应的域名。

I am running a LAMP server, and this .htaccess is giving me a 500 error. What this does is filter keywords and redirect to the respective domain names.

Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine on

RewriteCond %{HTTP_HOST} xy|yz|xz
RewriteRule ^xyz.com

RewriteCond %{HTTP_HOST} ab|bc|ac
RewriteRule ^abc.net


<IfModule>

来自error.log的错误消息

/var/www/conf/.htaccess: <IfModule> directive requires additional arguments, referer: http://localhost/conf/rewrite.php

为什么给我一个500错误,我是否必须检查是否已安装IfModule,或者是否必须安装。

Why does it give me a 500 error, do I have to check if IfModule is installed, or has to be installed.

谢谢Jean

推荐答案

您缺少斜线。结束标记必须为

You are missing a slash. The closing tag must be

</ifModule>

还可以解释错误消息:< IfModule>指令需要其他参数

that also explains the error message: <IfModule> directive requires additional arguments

这篇关于.htaccess错误的错误500的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆