大家好
我是新手,我的网站出现了如下问题,现在急需求助一个有效的解决办法,谢谢现在的产品的链接跟原始的链接不一样,现在的都是乱码一样,如找这个产品
Slendertone Bottom Toner for woman(Medium)
这个产品,原始的链接URL应该是:http://skihlz.com/slendertone-bottom-toner-for-womanmedium-p-271.html 
 
可是现在的显示是http://www.skihlz.com/product_info.php?products_id=271 现在输入原来的URL链接,是回到了点击首页那张大图的链接 
应该是是url rewrite没有配置好 ,但是我不懂怎么去设置我试着做了如下的代码,可是不生效
##### NOTE: Replace /shop/ with the relative web path of your catalog in the "Rewrite Base" line below:# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymLinks
Options +SymLinksIfOwnerMatchRewriteEngine OnRewriteBase /# From Ultimate SEO URLsRewriteRule ^(.*)-p-(.*).html$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]RewriteRule ^(.*)-c-(.*).html$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]RewriteRule ^(.*)-m-([0-9]+).html$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]RewriteRule ^(.*)-pi-([0-9]+).html$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]RewriteRule ^(.*)-pr-([0-9]+).html$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]RewriteRule ^(.*)-pri-([0-9]+).html$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]RewriteRule ^(.*)-ezp-([0-9]+).html$ index\.php?main_page=page&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 dreamscape's News & Articles ManagerRewriteRule ^news/?$ index\.php?main_page=news&%{QUERY_STRING} [L]RewriteRule ^news/rss.xml$ index\.php?main_page=news_rss&%{QUERY_STRING} [L]RewriteRule ^news/archive/?$ index\.php?main_page=news_archive&%{QUERY_STRING} [L]RewriteRule ^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html$ index\.php?main_page=news&date=$1-$2-$3&%{QUERY_STRING} [L]RewriteRule ^news/archive/([0-9]{4})-([0-9]{2}).html$ index\.php?main_page=news_archive&date=$1-$2&%{QUERY_STRING} [L]RewriteRule ^news/(.*)-a-([0-9]+)-comments.html$ index\.php?main_page=news_comments&article_id=$2&%{QUERY_STRING} [L]RewriteRule ^news/(.*)-a-([0-9]+).html$ index\.php?main_page=news_article&article_id=$2&%{QUERY_STRING} [L]# All other pages# Don't rewrite real files or directoriesRewriteCond %{REQUEST_FILENAME} !-f [NC] RewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*).html$ index\.php?main_page=$1&%{QUERY_STRING} [L]
急求助,希望大家多多帮忙,我的QQ:34090657非常感谢大家的帮忙
Edward

解决方案 »

  1.   

    如果http://skihlz.com/slendertone-bottom-toner-for-womanmedium-p-271.html现在无效
    如果http://www.skihlz.com/product_info.php?products_id=271现在有效那么就没有那么麻烦,规则也很简单
    RewriteEngine On
    RewriteRule ^[^\d]+(\d+)\.html$ product_info.php?products_id=$1试一下,祝你好运
      

  2.   

    你好,非常感谢你的回复,我用你的代码加在了.htaccess文件里,但是还是跟我提出的问题一样,没任何变化,
    当点击我网站中的任何一个产品,都会在地址栏中看到这样的url: http://www.skihlz.com/product_info.php?products_id=这是产品的ID号是不是还需要设置一下其他的文件,谢谢
    Edward
      

  3.   

    现在的产品的链接跟原始的链接不一样,现在的都是乱码一样,如找这个产品
    Slendertone Bottom Toner for woman(Medium)
    这个产品,原始的链接URL应该是:http://skihlz.com/slendertone-bottom-toner-for-womanmedium-p-271.html  
     
    可是现在的显示是http://www.skihlz.com/product_info.php?products_id=271  现在输入原来的URL链接,是回到了点击首页那张大图的链接  
    应该是是url rewrite没有配置好 ,但是我不懂怎么去设置
      

  4.   

    我现在大概已经知道是什么原因啦。当我在后台把seo urls 5 改成true后,所有产品的链接都是跟原始链接一样,但是这样新问题又出来了,就是当我点击我网站中的New Products 中的产品时,出现了以下错误信息:
    The requested URL /20sets-slendertone-system-bottom-toner-belt-p-361.html was not found on this server.Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request大家可以到我网站去试试。只要点击首页中滚动着的任何一个产品就会出现这个问题谢谢
    Edward  QQ 34090657