goatslayer
September 8th, 2010, 03:31 PM
Hi,
To give some context, I'm more of a newbie to putting a single modern web system together than any one technology. I have a question about incoming requests and returning the correct representation.
Problem:
1. User accesses information about an item through "http://example.com/doc/item/313" - For arguments sake, this is a shop item with unique id 313
2. "http://example.com/doc/item/313" (html) - doesn't exist on the server, it needs to be dynamically generated.
What step am I missing / do I need to do for the server to recognise this request, then run a php script that then returns the correct representation. In this case html, however if the user specifies .rdf or .json for example recognise that and allow the php script to make a call to return that representation.
I hope that makes sense! - any help appreciated.
Ross
To give some context, I'm more of a newbie to putting a single modern web system together than any one technology. I have a question about incoming requests and returning the correct representation.
Problem:
1. User accesses information about an item through "http://example.com/doc/item/313" - For arguments sake, this is a shop item with unique id 313
2. "http://example.com/doc/item/313" (html) - doesn't exist on the server, it needs to be dynamically generated.
What step am I missing / do I need to do for the server to recognise this request, then run a php script that then returns the correct representation. In this case html, however if the user specifies .rdf or .json for example recognise that and allow the php script to make a call to return that representation.
I hope that makes sense! - any help appreciated.
Ross