Forum Moderators: phranque
I'm trying to create a dynamic sitemap for my site.
RewriteRule ^sitemap/(.*)(/)?$ sitemap.php?show=$1 [R]
this line is supposed to send everything after sitemap/ to sitemap.php in the variable "show" but its actually giving a page not found error when the sitemap.php does exist.
can anyone have a quick look please.
Thanks!
A small comment.
RewriteRule ^sitemap/([A-Za-z0-9]+)?/?$ sitemap.php?show=$1 [L]
Wouldn't allow any characters in the return value other than letters and numbers. If this intended then no problem but otherwise you might want to consider.
RewriteRule ^sitemap/([a-z0-9_+-]+)?/?$ sitemap.php?show=$1 [NC,L]
I haven't tested it but its seems to make sense, I'm sure you'll get the gist. Don't allow additional characters unless you need to but so long as they don't sneak up on you. You could also consider spaces but hopefully they won't be required.
Matt
[edited by: MattyUK at 7:37 pm (utc) on Nov. 24, 2006]