如题,服务器的rewrite打开了,工作正常,datalife目录下 .htaccess 文件: DirectoryIndex index.php RewriteEngine On # 绣滂疱牝? RewriteRule ^page/(.*)$ index.php?cstart=$1 [L] # 燕?镱耱 RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6 [L] RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 [L] RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/printage,([0-9]+),(.*).html(/?)+$ engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 [L] RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4 [L] # 青 溴睃 RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$ index.php?year=$1&month=$2&day=$3 [L] RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$ index.php?year=$1&month=$2&day=$3&cstart=$4 [L] # 青 忮顸 戾?? RewriteRule ^([0-9]{4})/([0-9]{2})(/?)+$ index.php?year=$1&month=$2 [L] RewriteRule ^([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$ index.php?year=$1&month=$2&cstart=$3 [L] # 蔓忸?玎 忮顸 泐? RewriteRule ^([0-9]{4})(/?)+$ index.php?year=$1 [L] RewriteRule ^([0-9]{4})/page/([0-9]+)(/?)+$ index.php?year=$1&cstart=$2 [L] # 恹忸?潆 铗溴朦眍泐 屦? RewriteRule ^user/([^/]*)(/?)+$ index.php?subaction=userinfo&user=$1 [L] RewriteRule ^user/([^/]*)/page/([0-9]+)(/?)+$ index.php?subaction=userinfo&user=$1&cstart=$2 [L] # 恹忸?礤镳铟栩囗睇?耱囹彘 RewriteRule ^newposts(/?)+$ index.php?subaction=newposts [L] RewriteRule ^newposts/page/([0-9]+)(/?)+$ index.php?subaction=newposts&cstart=$1 [L] # 羊囹桉蜩麇耜桢 耱疣龛鳆 RewriteRule ^static/(.*).html(/?)+$ index.php?do=static&page=$1 [L] # 恹忸?桤狃囗睇?耱囹彘 RewriteRule ^favorites(/?)+$ index.php?do=favorites [L] RewriteRule ^favorites/page/([0-9]+)(/?)+$ index.php?do=favorites&cstart=$1 [L] RewriteRule ^statistics.html$ index.php?do=stats [L] RewriteRule ^addnews.html$ index.php?do=addnews [L] RewriteRule ^rss.xml$ engine/rss.php [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^.]+)/page/([0-9]+)(/?)+$ index.php?do=cat&category=$1&cstart=$2 [L] RewriteRule ^([^.]+)/?$ index.php?do=cat&category=$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^<]+)/rss.xml$ engine/rss.php?do=cat&category=$1 [L] RewriteRule ^page,([0-9]+),([^/]+).html$ index.php?do=static&page=$2&news_page=$1 [L] RewriteRule ^([^/]+).html$ index.php?do=static&page=$1 [L] 我的pw论坛伪静态是正常的,datalife打开伪静态后,各个页面访问时,链接已经变成 .html形式,但提示404错误,找不到页,请问如何解决?谢谢。
查看apache 配置, <Directory "/srv/www/htdocs"> # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs-2.2/mod/core.html#options # for more information. Options SymLinksifOwnerMatch # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit AllowOverride All # Controls who can get stuff from this server. Order allow,deny Allow from all </Directory> 找到上面这一段并改成这样,Options 段的参数你可一个一个试试,看哪个合适