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

Christopher Torgalson bedlamhotel at gmail.com
Tue Aug 17 23:52:14 CEST 2010


Hello again,

On Tue, Aug 17, 2010 at 2:34 PM, Thomas "Thasmo" Deinhamer
<thasmo at gmail.com> wrote:
> Christopher Torgalson wrote:
>>
>> I use exactly this rule on several sites: "RewriteRule ^sitemap\.xml$
>> /index.php?eID=dd_googlesitemap [R=301,L]" (along with variations of
>> it for feedburner).
>
> Thanks again for your feedback.
>
> I'm no expert in writing rewrite rules etc.
> but I'm just wondering why the redirect works
> and without the 'R' it doesn't.
>
> Is using a redirect (R=301) a cleaner approach
> compared to the rewrite rule without redirect?


The R flag is necessary. It forces the redirect and sends the
appropriate http header [1].

[1] http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriteflags


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




More information about the TYPO3-dev mailing list