InfiniteScroll和Apache重写

InfiniteScroll和Apache重写,apache,.htaccess,mod-rewrite,url-rewriting,infinite-scroll,Apache,.htaccess,Mod Rewrite,Url Rewriting,Infinite Scroll,我(又)糊涂了。我在利用保罗·爱尔兰的《无穷尽》。我还在.htaccess中使用apache重写 所以我有一个如下的URL: http://mydomain.org/foo/from2012-10-29/to2012-11-02/ My.htaccess规则(位于foo/)对它的解释如下: # if uri contains ONLY dates : RewriteCond %{REQUEST_URI} /from(.+)to(.+)/$ [NC] RewriteRule ^from([^/]

我(又)糊涂了。我在利用保罗·爱尔兰的《无穷尽》。我还在.htaccess中使用apache重写

所以我有一个如下的URL:

http://mydomain.org/foo/from2012-10-29/to2012-11-02/
My.htaccess规则(位于foo/)对它的解释如下:

# if uri contains ONLY dates :
RewriteCond %{REQUEST_URI} /from(.+)to(.+)/$ [NC]
RewriteRule ^from([^/]+)/to([^/]+)/$ index.php?from=$1&to=$2 [NC,L]

# if uri contains dates and page:
RewriteCond %{REQUEST_URI} "from.*to.*page" [NC]
RewriteRule ^from([^/]+)/to([^/]+)/page([0-9]+)/?$ index.php?from=$1&to=$2&p=$3 [NC,L]
这种情况下,当我向下滚动时,第2页的图像会被添加到屏幕上…但是如果我继续向下滚动,第2页会再次被点击。。。再一次。。。它只是不断添加第2页的图像,而不是转到第3页

但如果我从URL中删除日期并仅使用以下内容,则不会发生这种情况:

http://mydomain.org/foo/
相关访问规则:

# if uri contains ONLY page* at the end:
RewriteCond %{REQUEST_URI} /?page(.+) [NC]
RewriteRule ^page([0-9]+)/$ index.php?p=$1 [NC,L]
这个规则只在我向下滚动并点击第一个page2链接时生效。。。但它确实会转到第3页、第4页等,然后在应该的时候停止

那么,当我把日期包括在内时,我做错了什么

提前谢谢

轻度相关:

到目前为止,您采取了哪些调试措施?因为infinitescroll使用jQuery工作,也就是说,实际上没有转到新的url,所以我不确定如何调试。我在控制台(Chrome)中看到jQuery调用,所以我看到它一遍又一遍地调用“page2”url……我根本不是专家,所以我很难理解为什么上面的方法中有一种有效,而另一半有效。