URL Capture Challenge
Posted: Fri Feb 19, 2010 10:00 pm
I am not sure if this is possible, but it seems like it should be. I have a simple root directory for a website. The only thing I want in this directory is the index / controller file.
Users will access our site with custom URLs... i.e.
http://www.domain.com/bob
http://www.domain.com/sally
I wish the controller the capture the URL and then place the string after the slash, such as "bob" and "sally" in the example above. Simple enough right ? No.
This must scale to hundreds or thousands of custom URLs. When I do this it seems to want to look for a controller or file named "bob" or "sally" and the page errors out. That is to say that it is not even reaching the index.php file to run the code to capture the URL because it is erroring out trying to find a file named "bob" or "sally".
Any suggestions ? How do I have one single controller / index.php file and have custom URLs. The custom URLs do nothing more than alert us what sales rep referred them and outside of that do nothing else and do not refer to any files or folders. Seems simple enough but I dont know the answer. Much obliged for any help someone can provide.
Users will access our site with custom URLs... i.e.
http://www.domain.com/bob
http://www.domain.com/sally
I wish the controller the capture the URL and then place the string after the slash, such as "bob" and "sally" in the example above. Simple enough right ? No.
This must scale to hundreds or thousands of custom URLs. When I do this it seems to want to look for a controller or file named "bob" or "sally" and the page errors out. That is to say that it is not even reaching the index.php file to run the code to capture the URL because it is erroring out trying to find a file named "bob" or "sally".
Any suggestions ? How do I have one single controller / index.php file and have custom URLs. The custom URLs do nothing more than alert us what sales rep referred them and outside of that do nothing else and do not refer to any files or folders. Seems simple enough but I dont know the answer. Much obliged for any help someone can provide.