I wanted to submit sitemap to google webmaster,
google state only accept sitemap from my site
Option 1 - simple rewrite
I know this already working:
RewriteRule /sitemap.txt http://S3_URL [L]
But if I do a rewrite to another domain,
will google accept that? (unlikely)
Option 2 - include sitemap into code deployment workflow
I can't ensure the static sitemap can stay on my site permanently
due to rapid code deployment,
file structure might change from time to time.
I can choose to change the code deployment workflow ...
but is really the last option
Option 3 - upload to S3, and use a script to serve the sitemap
If I upload sitemap to AWS S3 (permanent content),
then write a script (permanent URL, can easily park into code deployment)
to serve the sitemap,
this should work, but it seems superfluous,
header("content-type: text/plain"); echo file_get_contents($s3_url);
Option 4 - ???
I dun have enough knowledge to describe the term,
Is there a way to have a rewrite to grab content without redirect?
The apache rewrite (I assume can be like ...) ?
Rewrite sitemap PassThru http://S3_URL
If option 1 is possible, then is easy fix.
Otherwise, option 4 is also easy fix.
Option 3 is already implemented,
Dun really want to go for Option 2...