<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Route requests for sitemap.xml to custom controller/action</title>
	<atom:link href="http://www.evilprofessor.co.uk/231-route-requests-for-sitemap-xml-to-custom-controlleraction/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.evilprofessor.co.uk/231-route-requests-for-sitemap-xml-to-custom-controlleraction/</link>
	<description>The website of Steven Lloyd Watkin</description>
	<lastBuildDate>Wed, 04 Jan 2012 14:02:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Steven Lloyd Watkin</title>
		<link>http://www.evilprofessor.co.uk/231-route-requests-for-sitemap-xml-to-custom-controlleraction/comment-page-1/#comment-7751</link>
		<dc:creator>Steven Lloyd Watkin</dc:creator>
		<pubDate>Tue, 17 May 2011 20:07:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.evilprofessor.co.uk/?p=231#comment-7751</guid>
		<description>It would seem that you&#039;re missing a couple of entries, try updating your routes to match:

resources.router.routes.sitemap.type = &quot;Zend_Controller_Router_Route_Static&quot;
resources.router.routes.sitemap.route                = &quot;sitemap.xml&quot;
resources.router.routes.sitemap.controller  = &quot;index&quot;
resources.router.routes.sitemap.action      = &quot;sitemap&quot;
resources.router.routes.sitemap.defaults.module = &quot;www&quot;
resources.router.routes.sitemap.defaults.controller  = &quot;index&quot;
resources.router.routes.sitemap.defaults.action      = &quot;sitemap&quot;
resources.router.routes.sitemap.defaults.route       = &quot;www-index&quot;</description>
		<content:encoded><![CDATA[<p>It would seem that you&#8217;re missing a couple of entries, try updating your routes to match:</p>
<p>resources.router.routes.sitemap.type = &#8220;Zend_Controller_Router_Route_Static&#8221;<br />
resources.router.routes.sitemap.route                = &#8220;sitemap.xml&#8221;<br />
resources.router.routes.sitemap.controller  = &#8220;index&#8221;<br />
resources.router.routes.sitemap.action      = &#8220;sitemap&#8221;<br />
resources.router.routes.sitemap.defaults.module = &#8220;www&#8221;<br />
resources.router.routes.sitemap.defaults.controller  = &#8220;index&#8221;<br />
resources.router.routes.sitemap.defaults.action      = &#8220;sitemap&#8221;<br />
resources.router.routes.sitemap.defaults.route       = &#8220;www-index&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Walter</title>
		<link>http://www.evilprofessor.co.uk/231-route-requests-for-sitemap-xml-to-custom-controlleraction/comment-page-1/#comment-7729</link>
		<dc:creator>Walter</dc:creator>
		<pubDate>Tue, 17 May 2011 00:36:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.evilprofessor.co.uk/?p=231#comment-7729</guid>
		<description>I have serious problems, I can&#039;t resolve it :(

I have router.ini

resources.router.routes.sitemap.type = “Zend_Controller_Router_Route”
resources.router.routes.sitemap.route = “sitemap.xml”
resources.router.routes.sitemap.defaults.controller = index
resources.router.routes.sitemap.defaults.action = sitemap

and bootstrap.php

	protected function _initRouter()
	{
		$frontController = Zend_Controller_Front::getInstance();
		$config = new Zend_Config_Ini(APPLICATION_PATH . &#039;/config/router.ini&#039;);
		$router = $frontController-&gt;getRouter();
		$router-&gt;addConfig($config, &#039;router&#039;);
        }

and I receive this error:

Exception information:

Message: Invalid controller specified (sitemap.xml)

Request Parameters:

array (
  &#039;controller&#039; =&gt; &#039;sitemap.xml&#039;,
  &#039;action&#039; =&gt; &#039;index&#039;,
  &#039;module&#039; =&gt; &#039;default&#039;,
)</description>
		<content:encoded><![CDATA[<p>I have serious problems, I can&#8217;t resolve it :(</p>
<p>I have router.ini</p>
<p>resources.router.routes.sitemap.type = “Zend_Controller_Router_Route”<br />
resources.router.routes.sitemap.route = “sitemap.xml”<br />
resources.router.routes.sitemap.defaults.controller = index<br />
resources.router.routes.sitemap.defaults.action = sitemap</p>
<p>and bootstrap.php</p>
<p>	protected function _initRouter()<br />
	{<br />
		$frontController = Zend_Controller_Front::getInstance();<br />
		$config = new Zend_Config_Ini(APPLICATION_PATH . &#8216;/config/router.ini&#8217;);<br />
		$router = $frontController-&gt;getRouter();<br />
		$router-&gt;addConfig($config, &#8216;router&#8217;);<br />
        }</p>
<p>and I receive this error:</p>
<p>Exception information:</p>
<p>Message: Invalid controller specified (sitemap.xml)</p>
<p>Request Parameters:</p>
<p>array (<br />
  &#8216;controller&#8217; =&gt; &#8216;sitemap.xml&#8217;,<br />
  &#8216;action&#8217; =&gt; &#8216;index&#8217;,<br />
  &#8216;module&#8217; =&gt; &#8216;default&#8217;,<br />
)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evilprofessor.co.uk &#187; Blog Archive &#187; Dynamically add pages to Zend_Navigation container at runtime</title>
		<link>http://www.evilprofessor.co.uk/231-route-requests-for-sitemap-xml-to-custom-controlleraction/comment-page-1/#comment-289</link>
		<dc:creator>Evilprofessor.co.uk &#187; Blog Archive &#187; Dynamically add pages to Zend_Navigation container at runtime</dc:creator>
		<pubDate>Thu, 07 Jan 2010 22:50:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.evilprofessor.co.uk/?p=231#comment-289</guid>
		<description>[...] a continuation on my last post about Zend_Navigation, Route requests for sitemap.xml to custom controller/action, this post is about dymnamically adding pages to a Zend_Navigation container at runtime/script [...]</description>
		<content:encoded><![CDATA[<p>[...] a continuation on my last post about Zend_Navigation, Route requests for sitemap.xml to custom controller/action, this post is about dymnamically adding pages to a Zend_Navigation container at runtime/script [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Lloyd Watkin</title>
		<link>http://www.evilprofessor.co.uk/231-route-requests-for-sitemap-xml-to-custom-controlleraction/comment-page-1/#comment-288</link>
		<dc:creator>Steven Lloyd Watkin</dc:creator>
		<pubDate>Wed, 06 Jan 2010 21:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.evilprofessor.co.uk/?p=231#comment-288</guid>
		<description>One thing I forgot to mention is that you&#039;ll also need to specify your standard route for your sitemap, otherwise all URLs will point to /sitemap.xml if you use Zend_Navigation_Page_Mvc (if you&#039;re supplying URIs there won&#039;t be a problem).

For example my latest project uses the following routing:

; ==============================
;  Resource Routing
; ==============================
resources.router.routes.www.type = &quot;Zend_Controller_Router_Route_Hostname&quot;
resources.router.routes.www.route = &quot;:module.example.com&quot;
resources.router.routes.www.defaults.module = &quot;default&quot;
resources.router.routes.www.chains.index.type = &quot;Zend_Controller_Router_Route&quot;
resources.router.routes.www.chains.index.route = &quot;:controller/:action/*&quot;
resources.router.routes.www.chains.index.defaults.controller = &quot;index&quot;
resources.router.routes.www.chains.index.defaults.action     = &quot;index&quot;
resources.router.routes.sitemap.type = &quot;Zend_Controller_Router_Route&quot;
resources.router.routes.sitemap.route                = &quot;sitemap.xml&quot;
resources.router.routes.sitemap.defaults.controller  = index
resources.router.routes.sitemap.defaults.action      = sitemap

Therefore in my navigation.xml (or whatever config you decide to use), you&#039;ll need to specify the routing to use, e.g.

default.pro.pages.aboutUs.label = &quot;Company profile&quot;
default.pro.pages.aboutUs.module = &quot;www&quot;
default.pro.pages.aboutUs.controller = &quot;about-us&quot;
default.pro.pages.aboutUs.action = &quot;index&quot;
default.pro.pages.aboutUs.resource = &quot;www_pages&quot;
default.pro.pages.aboutUs.route = &quot;www-index&quot;</description>
		<content:encoded><![CDATA[<p>One thing I forgot to mention is that you&#8217;ll also need to specify your standard route for your sitemap, otherwise all URLs will point to /sitemap.xml if you use Zend_Navigation_Page_Mvc (if you&#8217;re supplying URIs there won&#8217;t be a problem).</p>
<p>For example my latest project uses the following routing:</p>
<p>; ==============================<br />
;  Resource Routing<br />
; ==============================<br />
resources.router.routes.www.type = &#8220;Zend_Controller_Router_Route_Hostname&#8221;<br />
resources.router.routes.www.route = &#8220;:module.example.com&#8221;<br />
resources.router.routes.www.defaults.module = &#8220;default&#8221;<br />
resources.router.routes.www.chains.index.type = &#8220;Zend_Controller_Router_Route&#8221;<br />
resources.router.routes.www.chains.index.route = &#8220;:controller/:action/*&#8221;<br />
resources.router.routes.www.chains.index.defaults.controller = &#8220;index&#8221;<br />
resources.router.routes.www.chains.index.defaults.action     = &#8220;index&#8221;<br />
resources.router.routes.sitemap.type = &#8220;Zend_Controller_Router_Route&#8221;<br />
resources.router.routes.sitemap.route                = &#8220;sitemap.xml&#8221;<br />
resources.router.routes.sitemap.defaults.controller  = index<br />
resources.router.routes.sitemap.defaults.action      = sitemap</p>
<p>Therefore in my navigation.xml (or whatever config you decide to use), you&#8217;ll need to specify the routing to use, e.g.</p>
<p>default.pro.pages.aboutUs.label = &#8220;Company profile&#8221;<br />
default.pro.pages.aboutUs.module = &#8220;www&#8221;<br />
default.pro.pages.aboutUs.controller = &#8220;about-us&#8221;<br />
default.pro.pages.aboutUs.action = &#8220;index&#8221;<br />
default.pro.pages.aboutUs.resource = &#8220;www_pages&#8221;<br />
default.pro.pages.aboutUs.route = &#8220;www-index&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
