Hi,
I'm working on a script for my website to offer functionality similar to TinyURL.
I'm not trying to compete with them, just at least offer it as a part of the bigger site.
The site is setup to run a script anytime a call is made for a file/folder that is not physically available. The script takes the requested url and parses it out like such
www.mcdonalds.com/doesnotexist parses to 'doesnotexist'
Once this is done, it queries a table I have setup to find if there is a match for 'doesnotexist'.
If there is not a match, then it returns a 404 page not found error (custom for the site).
If there is a match, it checks a related column for another entry, which is a column that contains another URL.
Structure
---------------------
tbl_dns
dns_id (int-identity-pk)
dns_member_id (int-fk)
dns_domain (varchar-20)
dns_subdomain (varchar-30)
dns_redirect_url (nvarchar-255)
dns_date (Datetime)
dns_month_range (int)
explanation
------------------------------
dns_id (unique id, primary key)
dns_member_id (member ID of creator, 0 for anonymous
dns_domain (root domain aka company.com - here because I will use multiple domains)
dns_subdomain (what will come after company.com aka '123url' - company.com/123url )
dns_redirect_url (the url that the created subdomain will redirect to)
dns_date (the start or renew date for the domain)
dns_month_range (the length in months the redirect is to be active, will be deleted when expired)
Does this look ok?
I'm working on a script for my website to offer functionality similar to TinyURL.
I'm not trying to compete with them, just at least offer it as a part of the bigger site.
The site is setup to run a script anytime a call is made for a file/folder that is not physically available. The script takes the requested url and parses it out like such
www.mcdonalds.com/doesnotexist parses to 'doesnotexist'
Once this is done, it queries a table I have setup to find if there is a match for 'doesnotexist'.
If there is not a match, then it returns a 404 page not found error (custom for the site).
If there is a match, it checks a related column for another entry, which is a column that contains another URL.
Structure
---------------------
tbl_dns
dns_id (int-identity-pk)
dns_member_id (int-fk)
dns_domain (varchar-20)
dns_subdomain (varchar-30)
dns_redirect_url (nvarchar-255)
dns_date (Datetime)
dns_month_range (int)
explanation
------------------------------
dns_id (unique id, primary key)
dns_member_id (member ID of creator, 0 for anonymous
dns_domain (root domain aka company.com - here because I will use multiple domains)
dns_subdomain (what will come after company.com aka '123url' - company.com/123url )
dns_redirect_url (the url that the created subdomain will redirect to)
dns_date (the start or renew date for the domain)
dns_month_range (the length in months the redirect is to be active, will be deleted when expired)
Does this look ok?
