0

我正在用干净的 URL(使用.htaccess)重写我的网站 URL。我已经在我的.htaccess.

RewriteRule ^details/([^/]+)/([^/]+) front/detailsnew.php?catid=$1&title=$2 [NC] 

但 URL 显示如下:

My domain /details/Apartments/409-Palm-Beach-Condos#ad-image-0

我不希望#ad-image-0显示。我的href链接是

My domain/details/European/Test-Bisuwer

有谁知道这里有什么问题?

4

2 回答 2

2

在您的jquery.ad-gallery.js文件中,您需要删除以下行

500 以上的行号

评论 2 行:window.location.hash = "#ad-image-"+ thumb_link.attr("id");

 if(this.settings.update_window_hash) {
            var thumb_link = this.images[this.current_index].thumb_link;
            if (thumb_link.attr("id")) {
              //window.location.hash = "#ad-image-"+ thumb_link.attr("id");
            } else {
              //window.location.hash = "#ad-image-"+ this.current_index;
            };
          };
于 2013-12-05T11:39:44.077 回答
0

URL的#一部分是一个片段。它永远不会发送到服务器,并且仅由客户端(浏览器)用于处理内容,或者在某些情况下,是 AJAX 或其他 javascript 相互通信的一种方式。您无法在 htaccess 文件中删除它。浏览器自己生成它。但是查看片段,并在谷歌上搜索它,它可能与AD Gallery有关,有人提到ad-image-在使用 AD Gallery 时会获取片段。

于 2012-10-21T01:16:00.977 回答