我的链接这样蜘蛛问题,链接路径是不正确的蜘蛛,但正确的浏览器
<a href="dealerships/<?php echo $_GET['state'];?>/chevrolet/?brand=chevrolet&state=<?php echo $_GET['state'];?>">Acura</a>
<a href="/chevrolet/?brand=chevrolet&state=<?php echo $_GET['state'];?>">GMC</a>
<a href="chevrolet/?brand=chevrolet&state=<?php echo $_GET['state'];?>">Maserati</a>
表中的第一个正常显示,高达我使用蜘蛛模拟器(两种不同的)。第二和第三不这样做,但第一个解析为:
http://www.grademydealer.com/dealerships/texas/dealerships/texas/chevrolet/?brand=chevrolet&state=texas (WRONG)
另外两个是正确的:
http://www.grademydealer.com/dealerships/texas/chevrolet/?brand=chevrolet&state=texas
我该如何解决这个问题?
为什么OP能够在浏览时看到PHP代码?我假设他/她只会被HTML服务......看起来好像OP正在爬行的页面中存在一个错误。 – Kiril 2012-02-21 21:19:27
可能,但他说,链接正在解决粘贴的超链接,我不认为(尽管我可能是错的)。我认为问题在于他们没有指向正确的页面,因为他没有给出绝对的路径。也许该op可以clirify? – encodes 2012-02-21 21:24:54
你不能在html中看到php; - )...链接并不像你说的那样指向正确的路径。这很奇怪..我把整个表格转换成绝对路径 - http:// grademydealer/dealerships/.....这个工程,我只是没有想到我必须这样做 – 2012-02-21 21:29:56