Perhaps what I need to do isn’t possible but I just can’t find relevant information about it.
Issue: I have inherited a website with ugly and meaningless URLs and I’ve been asked to make them easy to remember (should have been done in the first place!), so now, I have to turn this:
http://www.domain.com/page.php?id=XXX
into this:
http://www.domain.com/name-of-page-that-refers-to-id-xxx
(e.g. http://www.domain.com/page.php?id=100 => http://www.domain.com/agenda)
Is it possible to do?
You will need to make the connection from
agendato id100somewhere. If this doesn’t change (i don’t assume that’s the case) you can define one rule for each site.If it is not static than you will have to modify your application and maybe the database schema. The easiest way – in my opinion – would be to add a column
sitenameto your DB table in which the sites are stored and create a unique index on it. Than you have to change your application to allow URLs likepage.php?sitename=agenda.Then you can add rewrite rules that translalte
www.domain.com/agendatowww.domain.com/page.php?sitename=agenda