How do I trap a bad URL and use it as a paramter?
Posted: Tue Oct 06, 2015 5:16 am
Hi,
I am a newbie to PHP but have 15 years of asp and Asp.net so UNIX and PHP is a bit out of my comfort zone.
However, I have been charged with the task of providing clients with a personalised url which look like this:
www.somesite.com/sarah
the website "somesite.com" exists but not the folder. The end result will be to extract the folder as a parameter and have a landing page (a bona fide URL) which says: Hi Sarah, welcome to somesite.
As there will be thousands of such urls it isn't practical to create them just to accommodate all possible names.
This may involve some htaccess work, but I am not sure if the parameter (the name, that is) will become lost - again, htaccess is a new experience for me.
Should the above not be workable, I am prepared to look at a workaround but the most important part is that the end user feels that the site has been personalised for them.
Many thanks in anticipation.
G
I am a newbie to PHP but have 15 years of asp and Asp.net so UNIX and PHP is a bit out of my comfort zone.
However, I have been charged with the task of providing clients with a personalised url which look like this:
www.somesite.com/sarah
the website "somesite.com" exists but not the folder. The end result will be to extract the folder as a parameter and have a landing page (a bona fide URL) which says: Hi Sarah, welcome to somesite.
As there will be thousands of such urls it isn't practical to create them just to accommodate all possible names.
This may involve some htaccess work, but I am not sure if the parameter (the name, that is) will become lost - again, htaccess is a new experience for me.
Should the above not be workable, I am prepared to look at a workaround but the most important part is that the end user feels that the site has been personalised for them.
Many thanks in anticipation.
G