Sitemap google in another location

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
calvin13
Posts: 10
Joined: Sun May 27, 2007 6:38 pm
Contact:

Sitemap google in another location

Post by calvin13 »

Hi,

I want my sitemaps to be in the root folder

1.-What i want:

http://u2fanlife.com/sitemapfaq.xml

2.-What I got:

http://u2fanlife.com/faq/sitemapfaq.xml

What is the rewrite rule in .htaccess to do that?

Thank you very much
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
we use the RewriteBase directive to avoid to write down the base path in each rule.
Just remove it and add the base part (i.e. /faq/) to all rules but the sitemap one. Enjoy PMF!

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
calvin13
Posts: 10
Joined: Sun May 27, 2007 6:38 pm
Contact:

Post by calvin13 »

Thank you for your quick response.

Please colud indicate me the exact change?

I tried this:

Original:

RewriteRule sitemap.xml$ sitemap.google.php [L]
RewriteRule sitemap.gz$ sitemap.google.php?gz=1 [L]
RewriteRule sitemap.xml.gz$ sitemap.google.php?gz=1 [L]

With the change:

I Delete RewriteBase /faq/

and changed

RewriteRule /faq/sitemap.xml$ /faq/sitemap.google.php [L]
RewriteRule /faq/sitemap.gz$ /faq/sitemap.google.php?gz=1 [L]
RewriteRule /faq/sitemap.xml.gz$ /faq/sitemap.google.php?gz=1 [L]

And didn't work (i think i'm doing something wrong)

Thank you again.

Best regards
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
you need to add the base path to all the rules but those related to the PMF Google sitemap.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Post Reply