[TYPO3-dev] Apache2 rewrite rule for sitemap.xml doesn't work

Christopher Torgalson bedlamhotel at gmail.com
Wed Aug 18 16:44:18 CEST 2010


Hi,

On Wed, Aug 18, 2010 at 12:44 AM, Dmitry Dulepov <dmitry at typo3.org> wrote:
> Hi!
>
> Thomas "Thasmo" Deinhamer wrote:
>> The following .htaccess rewrite rule:
>>
>>    # sitemap.xml
>>    RewriteCond %{REQUEST_FILENAME} sitemap\.xml
>>    RewriteRule ^sitemap\.xml$    /index.php?eID=dd_googlesitemap [L]
>>
>> does not work and throws the following error:
>>     "The page did not exist or was inaccessible. Reason: File
>> "sitemap.xml" was not found (2)!"
>
> Why do you need a redirect? Google and others are happy with
> "/index.php?eID=dd_googlesitemap".


Of course (note the 301 redirect to the actual url). In my case, there
are two reasons:

1. Prior to being built out on TYPO3 some of the sites had sitemaps
available at sitemap.xml

2. Some search engines/UAs besides Google, Bing and Yahoo may request
sitemap.xml; if they don't, the redirect makes no difference, if they
do, the sitemap is found and the search engine is instructed to
request index.php?eID=dd_googlesitemap in future.

Nice extension by the way :-)


-- 
Christopher Torgalson
http://www.typo3apprentice.com/




More information about the TYPO3-dev mailing list