我已经设置了新的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
答案 0 :(得分:1)
尝试将以下内容添加到.htaccess中,以帮助设置正确的默认值:
RewriteBase /
ErrorDocument 404 default
Options +FollowSymLinks