We have a 3rd party web service which we interact with via Soap. In this regard we query the 3rd party for resources, construct a home page and all links generated on this index page are referencing ID's of a 3rd party web service.

For example:

site.com/get.php?id=34bv43b34b3b34be //corresponds to "Service 1"
site.com/get.php?id=3443g43gg43g5h56 //corresponds to "Service 2"
and so on... 

Being that these are referencing a resource on a 3rd party, how can I use mod_rewrite or something similar to construct nice URLs.

Something such as:

site.com/get/Service_1 //corresponds to site.com/get.php?id=34bv43b34b3b34be

Would we have to index these services and system ID's on our own site potentially in a database or something to achieve this?

Basically, what I want to know is can I do this without storing any additional data on our site? If not, I understand that I could have a cron job setup to periodically poll the 3rd party web service for changes and have a local database with services and system IDs but we would really like a solution that doesn't involve this.


  • php
  • apache
  • mysql

Can provide more details of our system configuration if needed.


Unless there is a way to generate the ID (34bv...) from the service name (Service_1) then you will need to store the data somewhere. Judging by the ID format it could be an md5 hash (or part of).

But it's not difficult to create a MySQL table with id/name fields and look them up on page load. If you are not already, you ought to be caching the data from the 3rd party service locally to avoid constant lookups.

  • I understand it is trivial to setup a local DB, for simplicity we are always pulling from the 3rd party. This was a first revision of a web service app and the small nature of the soap requests means we are not really incurring a performance hit to pull it from them each time. Future plans are to cache some of this, but other applications using soap with this vendor are too dynamic to cache as this is an IT management application that we wanted to brand with our own domain and look. Looks like we will be setting up a cron to poll for updates and manage a local DB for this data as well, thanks. – Chris Sep 24 '10 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.