-2

我已经设置了新的 webhos http://www.godaddy.com/并将我的网站上传到这个godaday主机。现在的问题是我.htaccess的不工作。

只有 404 错误页面正在处理.htaccess

我的 .htacces 文件代码是:

RewriteEngine on
RewriteRule ^(.)web(.).html /webdetail.php?t=$1&webid=$2 [L]
RewriteRule ^c/([^/\.]+)/?$ catagory.php?cat=$1 [L]
RewriteRule ^c/(.)/(.) /catagory.php?page=$1&cat=$2 [L]
RewriteRule ^c-p/(.) /catagory.php?page=$1 [L]
RewriteRule ^c/ catagory.php
RewriteRule ^statep/(.)/(.)/(.) /state.php?state=$1&cat=$2&page=$3 [L]
RewriteRule ^statep/(.)/(.) /state.php?state=$1&page=$2 [L]
RewriteRule ^state/(.)/(.) /state.php?state=$1&cat=$2 [L]
RewriteRule ^state/(.) /state.php?state=$1 [L]
RewriteRule ^statep /state.php
RewriteRule ^cityp/(.)/(.)/(.) /city.php?city=$1&cat=$2&page=$3 [L]
RewriteRule ^cityp/(.)/(.) /city.php?city=$1&page=$2 [L]
RewriteRule ^city/(.)/(.) /city.php?city=$1&cat=$2 [L]
RewriteRule ^city/(.) /city.php?city=$1 [L]
RewriteRule ^cityp /city.php
RewriteRule ^recentvisit/(.) /recentvisit.php?page=$1 [L]
RewriteRule ^mostvisited/(.) /mostvisited.php?page=$1 [L]
RewriteRule ^allcategorys/(.) /allcategorys.php?page=$1 [L]
RewriteRule ^recentvisit recentvisit.php
RewriteRule ^mostvisited mostvisited.php
RewriteRule ^allcategorys allcategorys.php
RewriteRule ^sms/(.) /sms.php?cat=$1 [L]
RewriteRule ^webs/(.)/(.) /webdetail.php?webid=$1&t=$2 [L]
RewriteRule ^mailwebs/(.)/(.) /mailtocompany.php?webid=$1&t=$2 [L]
RewriteRule ^contactus contactus.php
RewriteRule ^(.)state(.)/(.) /state.php?state=$1&cat=$2&page=$3 [L]
RewriteRule ^(.)state/(.) /state.php?state=$1&page=$2 [L]
RewriteRule ^(.)-state(.).html /state.php?state=$1&cat=$2 [L]
RewriteRule ^(.)state.html /state.php?state=$1 [L]
RewriteRule ^(.)-city(.)/(.) /city.php?city=$1&cat=$2&page=$3 [L]
RewriteRule ^(.)city/(.) /city.php?city=$1&page=$2 [L]
RewriteRule ^(.)-city(.).html /city.php?city=$1&cat=$2 [L]
RewriteRule ^(.)-city.html /city.php?city=$1 [L]
RewriteRule ^(.)-tag/(.) /catagory.php?cat=$1&page=$2 [L]
RewriteRule ^(.)-tag.html /catagory.php?cat=$1 [L]
ErrorDocument 404 http://www.mydomain.com/error.php

我正在使用 php

4

1 回答 1

1

尝试将以下内容添加到您的 .htaccess 以帮助设置正确的默认值:

     RewriteBase / 
     ErrorDocument 404 default
     Options +FollowSymLinks
于 2012-09-10T22:14:40.720 回答