分享

写回答

发帖

[提问] 设置url rewrite后出现500错误

GoDaddy GoDaddy 2669 人阅读 | 10 人回复

发表于 2009-11-22 14:57:20 | 显示全部楼层 |阅读模式

目录为程序为html目录下的zhuna/
在该目录.htaccess文件中设置url rewrite如下
RewriteEngine On
RewriteBase /
RewriteRule ^Search-a([0-9]+)(?:-b([0-9]))?(?:-c([0-9]+))?(?:-d([0-9]+))?(?:-e([0-9]))?(?:-p([0-9]+))?.html$ search.php?cid=$1&xj=$2&lsid=$3&bid=$4&px=$5&p=$6
RewriteRule ^Hotel-([0-9]+)-([0-9]+).html$ hotel.php?cid=$1&hid=$2
RewriteRule ^cityLs-([0-9]+).html$ lscity.php?id=$1


设置完后打开网站出现500错误
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, support@supportwebsite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


请问这是怎么回事,是否是RewriteBase的错误,我尝试了
RewriteBase /zhuna/
RewriteBase /html/zhuna/
等等,还是500错误

回答|共 10 个

winight

发表于 2009-11-22 15:03:07 | 显示全部楼层

在我本机上试没问题

winight

发表于 2009-11-22 15:13:16 | 显示全部楼层

是这条规则有错误,删除了就没事了.可在本机上却没错误.谁能告诉我这条规则错在哪里
RewriteRule ^Search-a([0-9]+)(?:-b([0-9]))?(?:-c([0-9]+))?(?:-d([0-9]+))?(?:-e([0-9]))?(?:-p([0-9]+))?.html$ search.php?cid=$1&xj=$2&lsid=$3&bid=$4&px=$5&p=$6

add.c

发表于 2009-11-23 10:00:50 | 显示全部楼层

RewriteBase /zhuna 试试

kakan

发表于 2009-11-23 15:47:38 | 显示全部楼层

问一下godaddy, 你的主机上有没有安装Microsoft URL Rewrite Module for IIS 7.0 .

11月20号,(不知道为什么)他们给我换了服务器,从那以后我的网站也有500错误.
3天给他们写了二三十封电子邮件,还是无法解决.
后来上网查了,再做了试验才知道是因为新的服务器没有URL Rewrite Module.
三天前的那个服务器上是有的.正在给他们写信要求安装.
不过他们回信那叫一个慢,至少5个小时,有时要10多个小时,而且根本找不出原因,只是应付回信.
只能不断写,说不定他们哪个客服能做点正确的事,不过概率不高.

add.c

发表于 2009-11-23 15:50:19 | 显示全部楼层

GoDaddy的Windows空间不支持rul rewrite

kakan

发表于 2009-11-23 16:45:03 | 显示全部楼层

应该是支持的,至少有的支持,3天之前我使用的服务器就支持,我用的是虚拟主机.
但是现在的不支持了.我什么都没改,是他们给我换的主机.

他们的帮助文件里也说windows主机支持,
http://help.godaddy.com/article/5443
只有labeled Windows Web Hosting不支持,我不知道这里的labeled是指什么.

评分

参与人数 1金币 +3 收起 理由
add.c + 3 感谢提供

查看全部评分

add.c

发表于 2009-11-23 16:59:22 | 显示全部楼层

回复 7# 的帖子

他有说明如何查看label
If your hosting account is labeled Windows Web Hosting, the Microsoft URL Rewrite Module is not supported. To check, log in to your Account Manager, and then click Hosting in the My Products section. Your hosting account's label displays beneath its domain name.
比如这个标签是Deluxe Hosting - Windows
hostiing-lable.gif


[ 本帖最后由 add.c 于 2009-11-23 05:03 PM 编辑 ]

kakan

发表于 2009-11-23 17:23:07 | 显示全部楼层

谢谢 add.c
原来我误解了这个labeled的意思,
那么这个Windows Web Hosting 和deluxe hosting-windows 不是一回事喽
deluxe hosting-windows是有URL Rewrite Module的,对吧.
对了,我用的也是deluxe

add.c

发表于 2009-11-23 17:41:28 | 显示全部楼层

回复 9# 的帖子

你的是iis7么? 如果是的而不支持rewrite建议你联系客服安装
您需要登录后才可以回帖 登录 | 注册

本版积分规则