0

Firstly I'm not sure whether I'm asking at the right place or not (either here or stackoverflow). Sorry, if I'm not.

Before that:

My site runs on apache and developed using PHP.

What I'm trying to do is:

  1. My client can generate a registration page for its customers.
  2. The default generated registration page URL is something like www.mydomain.com/test.php?clientid=2
  3. But the url is long and ugly, so I created another option for the client to generate a prettier looking url, which starts with a shorter domain (eg: like.my) and a customizable 'path' after that. So the resulting pretty url my client want is like http://like.my/page.
  4. So there is a simple way to redirect the traffic from http://like.my/page to http://www.mydomain.com/test.php?clientid=2?
  5. Btw I have thousands of clients and each of them would have different pretty url pointing to different other pages.
peterh
  • 4,914
  • 13
  • 29
  • 44
imin
  • 83
  • 10
  • hmmm @dawud thanks for your comment but is there any way of doing it programatically? – imin Jul 10 '14 at 08:17
  • It depends on your application server software. If it is made with a framework, chances are that the framework contains a routing component, which handles these things easily. Then you only insert the rewrite rule shown in framework's documentation to `.htaccess`, and you have pretty URLs in use then. – Tero Kilkanen Jul 10 '14 at 11:11
  • thanks @TeroKilkanen for the explanation. my application wasn't written using any framework. so is there anyway I can refer to so I can write the same type of routing component that these frameworks have? – imin Jul 11 '14 at 16:47
  • This is Symfony2's router component: http://symfony.com/doc/current/components/routing/introduction.html . – Tero Kilkanen Jul 12 '14 at 01:29

0 Answers0