Thread:Manual talk:Short URL/Apache/AllowOverride All/reply (12)

The VirtualHost is a better location, though you don't need it in the directory block.

But %{DOCUMENT_ROOT} is still being used. So the problem hasn't changed at all.