Condensing multiple domains using .htaccess

Hi all,
I’m currently hosting multiple domains on a single web space. The files for each website are located in different folders: in /public_html/folder1 in /public_html/folder2 in /public_html/folder3

All of the sites are the same, with the exception of some personal data, some photos, and some links. So, I wrote some php code to swap out these details, based on an ID from the query string. Everything is ready, but now I’m looking for a way to use my .htaccess to redirect requests for each of the domain names to the same folder and file, but with a different query string parameter.

E.g. -> /public_html/folder4/index.php?id=1 -> /public_html/folder4/index.php?id=2 -> /public_html/folder4/index.php?id=2

Also, obviously, the domain names needs to be preserved: -> -> ->

I’m a novice with .htaccess, and so am having one heck of a time getting this working.

Can some kind soul out there help me out with this one?


Sponsor our Newsletter | Privacy Policy | Terms of Service