How can I achieve this functionality to allow url prefixes without hacking the core?
Use i18n. It does this for you. 

You have the possibility to choose how the content is served (from the module configuration page), between a subdomain for ex. "au.mysite.com/post-name" and prefixes like "mysite.com/au/post-name".

You will have a language field for your content-type, and you can easily set different content for different languages.