搜索引擎是否读取/应用获取变量?
假设我们有带有以下链接的 index.php
。
<a href="index.php?page=home">Home></a>
<a href="index.php?page=contact">Contact</a>
接下来是以下动态内容...
<div id="content">
<?php inlclude "./content/" . $_GET['page'] . ".php"; ?>
</div>
我正在创建自己的轻量级 CMS,我想知道搜索引擎是否会使用获取变量抓取这些链接并拉取/索引内容。我还计划以类似的方式控制我的元内容。
搜索引擎读取/应用获取变量吗?
Lets say we have index.php
with the following links.
<a href="index.php?page=home">Home></a>
<a href="index.php?page=contact">Contact</a>
Followed by the following dynamic content...
<div id="content">
<?php inlclude "./content/" . $_GET['page'] . ".php"; ?>
</div>
I am in the process of creating my own light weight CMS and i'm wondering if search engines will crawl through these links with the get variables and pull/index the content. I also plan on controlling my meta-content in a similar fashion.
Do Search Engines read/apply get variables?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
他们肯定会的。否则,如果不使用漂亮的网址,他们就会错过网络上的大部分动态内容;)
They surely will. Else they'd miss most of the dynamic content on the web not using nice urls ;)
搜索引擎将扫描网页中的超链接并存储它们遇到的任何独特位置。
index.php
与index.php?q=home
的位置与index.php?q=about
的位置不同。当然,除非您告诉搜索引擎不要使用 robots.txt 文件扫描该页面。
Search engines will scan a webpage for hyperlinks and store any unique locations that they come across.
index.php
is a different location thanindex.php?q=home
is a different location thanindex.php?q=about
.Unless of course you've told the search engines not to scan that page with a robots.txt file.
回到搜索引擎的早期,答案是否定的。如今,搜索引擎更加智能,即使具有相同的根页面名称,大多数情况下也能够区分页面。
但是,使用RESTful应用程序设计肯定会更好,这需要使用
mod_rewrite
或其他一些技术来使您的 URL 更加透明。鉴于您正处于创建 CMS 的规划阶段,我肯定会阅读有关如何在您的程序中实现 REST 的信息,从而完全避免该问题。Back in the early days of search engines, the answer was no. Nowadays search engines are smarter and are for the most part able to differentiate pages even with the same root pagename.
However, it will definitely be better to use a RESTful application design, and that will entail using
mod_rewrite
or some other technique to make your URLs more transparent. Given that you're in the planning stages of creating the CMS, I would definitely read up on how to implement REST in your program, avoiding the problem entirely.