>From the doc:

By default, mod_rewrite configuration settings from the main server context are not inherited by virtual hosts. To make the main server settings apply to virtual hosts, you must place the following directives in each <VirtualHost> section:

I guess the default site enable VirtualHost (port 80) for my entire site, thus rewrite rules won't be inherited, thus need to specify under VirtualHost Section.

Thanks again, cheers,
Derrick

On Fri, Jan 6, 2012 at 1:08 PM, Carlos Borroto <carlos.borroto@gmail.com> wrote:
On Thu, Jan 5, 2012 at 8:51 PM, Derrick LIN <klin938@gmail.com> wrote:
> Hi Carlos,
>
> You are right! I put the same config to site-available and now it works!
>
> Will do more testing/configuring base on that.
>
> Do you know why the location of the settings cause this issue?
>

I would have to read a little more, but directives in apache are
context specific, I guess the ones you are using are <VirtualHost>
specific.

You could read more here:
http://httpd.apache.org/docs/current/mod/mod_rewrite.html

Glad it worked.