Solved bug on url router when wordpress is installed inside a subfolder.

Wordpress sites installed inside a subfolder on the server, had wrong generated urls from the router. The router did not take the subfolder into account, and added it to the url when it should not have to. This resulted in a HTTP 404 error.
This problem is solved by using home_url() instead of site_url()