I’m pretty new to web development in general and CakePHP in particular, so apologies ahead of time if the answer to my question is painfully obvious.
My project is to create QR codes that will connect to websites both within and external to the domain and to track the number of times each QR code is scanned. I’ve created a user interface and system to generate QR codes using the google api. The QR code is generated by appending a random four letter code to the host domain name and saving the QR code and target URL to the database. So, if I was the developer for http://www.example.com, the QR code would be encoded with something like “http://www.example.com/QeIR” while the actual target URL might be http://www.google.com. The idea is that the QR code reader would scan the QR code, visit the domain and increment a scan counter, and then be redirected to the actual website. (I don’t know of any other way to directly track the number of times the QR code has been scanned.)
I would like some guidance for how to redirect the browser from the scanned URL to the actual destination URL. Would this be something I would code within .htaccess?
Thanks.
After incrementing the counter simply call
from within the controller. For more info see: http://book.cakephp.org/2.0/en/controllers.html#flow-control