I may be going down the wrong path here so please let me know if there is a better way of accomplishing this.
I'm building an ecom on the side of wordpress and want to dynamicaly parse the url when the uri begins with /category/ and /product/. For whenever there is a url match i want to load 2 seperate templates.
As a test, I copied the wp object of a valid request "/sample-page/" and in is_404() (the first function I came accross that deals with the templates I replaced the wp object built with the previous valid object wich will obviously load the same page no matter what is in the url.
My question being, After I have used the main wp object to analys whether or not I need to load the cat/prod template can I rebuild the wp object to include valid results for a specifict wordpress page, i.e. 'ecomcategories page' or p=12