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:

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

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

Posted by RememberToForget •