2 Answers
2

First you need to know that mod_rewrite can only handle requests to the server. So you would need to request /logo to have it rewritten to /pages/logo.html. And that’s what the rule does, it rewrites requests with the URL path /logo internally to /pages/logo.html and not vice versa.

If you now want to use portions of the matched string, you need to use groups to group them ( (expr)) that you then can reference to with $n. In your case the pattern [^/] will be suitable that describes any character other than the slash /:

The only thing I struggled with was getting it so that it didn't apply to the php files on my server, which weren't subject to this rewrite. I ended up going with RewriteCond %{REQUEST_FILENAME} !^.*\.php$
–
YahelSep 12 '09 at 15:00

You could also use RewriteCond %{REQUEST_FILENAME} !-f to exclude any existing regular file.
–
GumboSep 12 '09 at 22:41