Forum Topic: sitemap stuff

Forum: .htaccess Forum : General • Posted by RememberToForget • Updated:

Man, I’m going nuts trying to figure out how you…

  1. Got your sitemap looking so sexy
  2. Got all requests for “sitemap” to redirect to sitemap.xml (without causing an infinite redirect loop)

^_^

2 Replies to “sitemap stuff”

Posted by Jeff Starr

Hehe, here is the magic recipe:

# SITEMAPS
<IfModule mod_rewrite.c>
	RewriteCond %{REQUEST_URI} !^/sitemap\.(xml|xsl)(\.gz)? [NC]
	RewriteCond %{REQUEST_URI} !^/(search|tag) [NC]
	RewriteCond %{REQUEST_URI} /sitemap [NC]
	RewriteRule .* https://perishablepress.com/sitemap.xml [R=301,L]
</IfModule>

Never been posted! But you may need to refine according to your needs.

Posted by RememberToForget •

Bam.