If you want to create your own script there is program called "php sitemap ng" at http://enarion.net/google/phpsitemapng . This can be a real good starting place.
If you run a content based site (like YouTube for example), just write a small script that reads your database and generates an XML file for each URL.
Put it as a cron job once every day/week. You can also ping Google/Yahoo/MSN etc. when your sitemap gets updated so they can pick your new sitemap and index the new URL's.
Select CONCAT("http://mysite.com/article/",article.friendly_url) from article
但正如我所说,它很大程度上取决于您的架构/编程......
It really depends of how is programmatically build your website, if your website is huge and reflects a db schema, the best thing is to write a friendly url generator and store it to the db.
Thank to this system you'll be able to manage retrieve your sitemap easilly
Select CONCAT("http://mysite.com/article/",article.friendly_url) from article
But as I said it highly depends of your architecture / programming ....
Automatically is very hard. You can help though, by using correct semantics.
This will make Google pick up your site's structure better.
When your website consist of static pages you can create a sitemap yourself. If though it is generated with a database you can do this programmaticly. This won't be easy though if you have no experience.
If you use a CMS like Wordpress or Drupal or ... you probably can generate it with a plugin. Use Google for that!
发布评论
评论(4)
如果您的网站架构包含在数据库(如 CMS)中,您可以执行 Darkyo 建议的操作。
然而,还有更简单的方法。有许多免费服务可以抓取您的网站并创建站点地图
http://www.xml-sitemaps.com/< /a> 或 http://sitemapdoc.com/ 是一些示例,但 Internet 上到处都是这样的示例。只需谷歌“站点地图创建者”即可。
如果您想创建自己的脚本,有一个名为“php sitemap ng”的程序,位于 http://enarion.net/google /phpsitemapng 。这可能是一个真正好的起点。
If your site architecture is contained in a database (like a CMS) you can do something like Darkyo suggested.
However there are easier methods. There are many free services which crawl your site and create a sitemap
http://www.xml-sitemaps.com/ or http://sitemapdoc.com/ are some examples but the Internet is full of them. Just google "sitemap creator".
If you want to create your own script there is program called "php sitemap ng" at http://enarion.net/google/phpsitemapng . This can be a real good starting place.
如果您运行基于内容的网站(例如 YouTube),只需编写一个小脚本来读取数据库并为每个 URL 生成一个 XML 文件。
将其作为每天/每周一次的 cron 作业。当您的站点地图更新时,您还可以 ping Google/Yahoo/MSN 等,以便他们可以选择您的新站点地图并为新 URL 建立索引。
If you run a content based site (like YouTube for example), just write a small script that reads your database and generates an XML file for each URL.
Put it as a cron job once every day/week. You can also ping Google/Yahoo/MSN etc. when your sitemap gets updated so they can pick your new sitemap and index the new URL's.
这实际上取决于如何以编程方式构建您的网站,
如果您的网站很大并且反映了数据库模式,那么最好的事情
就是写一个友好的url生成器并将其存储到数据库中。
感谢这个系统,您将能够轻松地管理检索您的站点地图,
但正如我所说,它很大程度上取决于您的架构/编程......
It really depends of how is programmatically build your website,
if your website is huge and reflects a db schema, the best thing
is to write a friendly url generator and store it to the db.
Thank to this system you'll be able to manage retrieve your sitemap easilly
But as I said it highly depends of your architecture / programming ....
自动非常困难。不过,您可以通过使用正确的语义来提供帮助。
这将使 Google 更好地选择您网站的结构。
当您的网站由静态页面组成时,您可以自己创建站点地图。如果它是使用数据库生成的,您可以通过编程方式执行此操作。如果您没有经验,这并不容易。
如果您使用 WordPress 或 Drupal 等 CMS,或者...您可能可以使用插件生成它。使用谷歌!
Automatically is very hard. You can help though, by using correct semantics.
This will make Google pick up your site's structure better.
When your website consist of static pages you can create a sitemap yourself. If though it is generated with a database you can do this programmaticly. This won't be easy though if you have no experience.
If you use a CMS like Wordpress or Drupal or ... you probably can generate it with a plugin. Use Google for that!