mod_rewrite - rule redirects when redirect not wanted
I have the following:
# 开发者_如何学运维Enable Redirects
RewriteEngine On
RewriteBase /
Options +FollowSymlinks
Options -Indexes
RewriteRule ^sitemap\.xml$ http://%{HTTP_HOST}/index.php?route=feed/google_sitemap [L,NC]
From what I've read it should just internally rewrite sitemap.xml
to http://%{HTTP_HOST}/index.php?route=feed/google_sitemap
and not do any redirecting (i.e. changing the URL in the browser), but it is doing and I don't want that.
Can someone point out why please?
I've tried removing the L
flag, thinking maybe it's to do with the characters in the URL?
Actually, if I'm not mistaken, mod_rewrite redirects upon getting served with a http-link. What happens if you remove http://%{HTTP_HOST}/
? Try it out, and let us know what happens!
精彩评论