Question about mod_rewrite rule for redirecting failing pages
- by SimpleCoder
I'm setting up a mod_rewrite rule that redirects failing pages to a custom Page Not Found page. This is with Wordpress. I'm using the guide here: http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide_advanced.html#redirect404. My rule so far looks like this:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) http://example.com/?page_id=254 [R]
This works. It seems to be a combination of the first and second suggestion that worked, since the -U flag did nothing.
My question is, out of curiosity why the following happens: When I change REQUEST_FILENAME to REQUEST_URI (as the second example suggests), the page loads, but none of the style sheets load. All of my formatting is gone, and this happens on every page. Can anyone think of why this might happen?