Closed (fixed)
Project:
RobotsTxt
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Feature request
Reporter:
Created:
23 Apr 2007 at 07:43 UTC
Updated:
19 Aug 2007 at 19:18 UTC
Jump to comment: Most recent file
We need an api function to be able to extend the robots.txt dynamically. For example XML Sitemaps (formerly known as Google Sitemaps) needs to extend the file. With a line
Sitemap: http://www.example.com/sitemap.xml
or
Sitemap: http://www.example.com/gsitemap
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | hook_robotstxt.patch | 822 bytes | hass |
| #3 | robotstxt_hook.patch | 798 bytes | hass |
Comments
Comment #1
david straussThat's a good idea. How do you suggest the API should work? This module should probably move toward a rule-based system instead of just a bunch of text.
Comment #2
hass commentedi only thought about a hook yet, but if you have a better idea... why not. hooks maybe to slow!? i don't know.
what is a rule based system you are talking about?
Comment #3
hass commentedHere is a patch for this feature. Let me know what you think about and if you'd like to commit it, please.
A module like gsitemap is then able to implement this in the following way (as an example):
Comment #4
hass commentedsmall mistake. this is the correct code example:
Comment #5
david straussI'm going to make a few tweaks to the patch for performance, but I'll just mark it as "ready to commit."
Comment #6
hass commentedi found one problem, but i'm not sure if this is why i'm not so familiar with some array functions... it looks like that it is not possibly to add arrays with the same Keys together... if the Key is 'Disallow' all array members with Disallow are merged into the last inserted array member... isn't it possible to have more then one key with the same name added to an array?
then there should be something to be changed...
Comment #7
hass commentedReworked the patch with some changes.
Are you able to *official* release the module - for "update_status" module, please? :-)
Comment #8
hass commentedCode example for other modules like XML Sitemap:
Comment #9
hass commentedComment #10
(not verified) commented