Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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,

http://mysite.com/sitemap.php

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...

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Option 1 is possible (shock me!)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.