how to shared hosting of site?

I have a domain is 'http://test.com'. I create another domain is 'http://s.test.com'. I want image upload, css cache and js cache store  in 'http://s.test.com'. What should I do?

Sorry! My english is bad.