1、SEO URLs 问题解决方案如果网站安装了 Ultimate SEO URLs 模块但是没有效果不显示 .html 的情况,首先进入网站后台,从 Configuration 下找到 SEO URLs 查看其中的设置是否正常,如下图:正常情况如上图设置是没问题的。接下来查看网站根目录下的.htaccess 文件是否存在或是否正常,命名一定是.htaccess.htaccess 文件内容如下,有的会有些不同# NOTE: Replace /shop/ with the relative web path of your catalog in the “Rewrite Base“ line bel
2、ow:Options +FollowSymLinksRewriteEngine OnRewriteBase /# From Ultimate SEO URLsRewriteRule (.*)-p-(.*).html$ index.php?main_page=product_info&products_id=$2&%QUERY_STRING LRewriteRule (.*)-c-(.*).html$ index.php?main_page=index&cPath=$2&%QUERY_STRING LRewriteRule (.*)-m-(0-9+).html$ index.php?main_p
3、age=index&manufacturers_id=$2&%QUERY_STRING LRewriteRule (.*)-pi-(0-9+).html$ index.php?main_page=popup_image&pID=$2&%QUERY_STRING LRewriteRule (.*)-pr-(0-9+).html$ index.php?main_page=product_reviews&products_id=$2&%QUERY_STRING LRewriteRule (.*)-pri-(0-9+).html$ index.php?main_page=product_reviews
4、_info&products_id=$2&%QUERY_STRING L# For Open Operations Info ManagerRewriteRule (.*)-i-(0-9+).html$ index.php?main_page=info_manager&pages_id=$2&%QUERY_STRING L# For dreamscapes News & Articles ManagerRewriteRule news/?$ index.php?main_page=news&%QUERY_STRING LRewriteRule news/rss.xml$ index.php?m
5、ain_page=news_rss&%QUERY_STRING LRewriteRule news/archive/?$ index.php?main_page=news_archive&%QUERY_STRING LRewriteRule news/(0-94)-(0-92)-(0-92).html$ index.php?main_page=news&date=$1-$2-$3&%QUERY_STRING LRewriteRule news/archive/(0-94)-(0-92).html$ index.php?main_page=news_archive&date=$1-$2&%QUE
6、RY_STRING LRewriteRule news/(.*)-a-(0-9+)-comments.html$ index.php?main_page=news_comments&article_id=$2&%QUERY_STRING LRewriteRule news/(.*)-a-(0-9+).html$ index.php?main_page=news_article&article_id=$2&%QUERY_STRING L# All other pages# Dont rewrite real files or directoriesRewriteCond %REQUEST_FIL
7、ENAME !-f NC RewriteCond %REQUEST_FILENAME !-dRewriteRule (.*).html$ index.php?main_page=$1&%QUERY_STRING L如果以上情况都正常,地址栏还是不能显示.html则查看 Configuration 菜单下是否存在 SEO URLs 和 Simple SEO URL两个(如下图) ,如果有,则把一种关闭掉,即把相关设置为 true 的都改为 false.最好是把 Simple SEO URL 关掉。关闭 Simple SEO URL 如下图所示SEO URL 有时也会出现这种情况,就是鼠标移至链接
8、上时,浏览器下面的状态条里面显示的链接地址也会出现没有.html,而点击时浏览器地址栏的链接地址是有.html 的,出现这种情况是在安装 SEO URLs 的时候有一个文件没有覆盖掉,即includes/functions/html_output.php 文件,在 ultimate_seo_urls_2-107 模块里面这个文件放在ultimate_seo_urls_2-107v138-specific-filesincludesfunctions 底下的,有些人的此模块是不存在此目录和此文件,所以就会出现 html_output.php 文件没有被覆盖,所以它在浏览器的状态栏里输出的地址是不带.html 的,所以我们要找到此模块的原始安装文件,找到此文件,将服务器上的该文件覆盖掉就好了