Wednesday, May 23, 2012

Serving different XML content on the same web

I don't know if this is the suitable place to ask this question, so I am sorry if I am doing it wrong. I think this is not a duplicate question. If it is, I am sorry too.



Currently, I have a web app which takes its content from a unique XML document. The URL is "http://webapp.com/"



The problem is that now I have to create a second version of the web which uses a new different XML document, so I have to put them different URLs, something like the following:



http://webapp.com/activities

http://webapp.com/stages



How can I have all my sources on just one directory on server-side (I suppose it's better to maintain, the resources are cached better, etc...) but with these 2 URLs pointing to the folder and making the PHP loades the XML depending on the URL?



I suppose I have to change the .htaccess file to redirect to that folder, but how can I tell what XML I must load? And the user must see on the search bar the URL he used, for example "http://webapp.com/activities"



Can anybody help me please?
Thanks for all





No comments:

Post a Comment