Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4108874
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:43:02+00:00 2026-05-20T21:43:02+00:00

I have a website and I want to create a dynamic sitemap for it.

  • 0

I have a website and I want to create a dynamic sitemap for it. I use Google App Engine with Python and Django.

I developed another website using PHP and the sitemap.xml was accessable because of this Rewrite Rule I wrote on the .htaccess of the Apache Server.

RewriteRule (.*)\.xml(.*) $1.php$2 [nocase]

The .xml file was generated like this:


$sql_select ="SELECT titulo, title, data_insercao FROM livros l ORDER BY titulo ASC";
$result = mysql_query($sql_select) or die(mysql_error());
while($row = mysql_fetch_array($result)) {
$titulo = $row['titulo'];
$title = $row['title'];
$data = $row['data_insercao'];
$sql_comentario ="SELECT data FROM comentarios WHERE livros_title = '" . $title . "' order by data desc LIMIT 0 , 1";
$result_comentario = mysql_query($sql_comentario) or die(mysql_error());
$row_comentario = mysql_fetch_array($result_comentario);
if($row_comentario){
$data = $row_comentario['data'];
}
$pieces = explode(" ", $data);
$data = $pieces[0];
$url_product = 'http://www.sinopsedolivro.net/livro/' . $title . '.html';
echo
' <url>
<loc>'.$url_product.'</loc>
<lastmod>'.$data.'</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
';
}

Is there any option for my case (GAE + Python) so when one access http://www.mydomain.com/sitemap.xml, he will receive from the server a .xml file with the dynamicaly content generate myself using python?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T21:43:02+00:00Added an answer on May 20, 2026 at 9:43 pm

    Sure, you can provide any response you want to any url with your application. Just map your controller to /sitemap.xml and write the code that outputs your xml in there. Don’t forget to set the mime type of the response to the right value.

    If you are using django, you might want to read http://docs.djangoproject.com/en/dev/topics/http/urls/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website developed using Drupal. What I want is to create a
I want to create a website for students with django. I have learning_plan with
I want to create a website with various users. The users can have different
I have a website project that I want to build using CruiseControl.net. On one
I have a website that has members. I want to create a feature that
I have the website written in PHP (Kohana) and MySQL. I want to create
I have created a website and I want to create a control panel for
I have a wordpress website, and I want to create a simple web commerce.
I've created website with dynamic content, and I want google to know all my
I want to create a dynamic website that does not support IIS. The area

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.