PDA

View Full Version : RewriteRule - suddenly isn't working like it used to


Dan Pritchard
02-14-2006, 07:43 PM
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^test.xml /blog/feed/atom/ [nc]

I'm trying to send requests for /feed.xml (at the root of my website) to /blog/feed/atom/ .

I put the above in my .htaccess file in /public_html (I can't remember whether the FollowSymlinks was already there before I ever looked at my .htaccess, or not. But I'm including it for completeness).

Anyway, it used to work perfectly, back when the rewriterule was slightly different, something like this:RewriteRule ^test.xml blog/feed?type=atom [nc]I can't remember exactly what the atom URL was, but that's ALL that changed.

Now what happens, I changed it to work with wordpress 2.0 and I know it's now trying to display something within blog/ (since WordPress's 404 is shown) but I don't know what. All I know is that it's 404. It should be returning my Atom feed (http://danpritchard.com/blog/feed/atom/ ).

the url is http://danpritchard.com/test.xml
You can check out URLs I'm trying to redirect to, and they work fine. I just don't know what they're redirecting to because of the nature of RewriteRule. I'm going to see if my logs can shed some light. Anyone know what's going on?

EDIT: I changed the URL to test.xml. I was able to fix feed.xml temporarily to unbreak something by using this: RedirectMatch ^/feed.xml /blog/feed/atom/

But I want to know how to make it work with RewriteRule. /test.xml is now supposed to be RewriteRule --> /blog/feed/atom/

Thanks for your help