[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Dynamic URLS?

Posted on 2005-04-10
4
Medium Priority
?
221 Views
Last Modified: 2013-12-24
Being a newbie ... I find the slightest mention of a development term ... and assume I can use! :-)
Perhaps this is another example?

I have many differemt 'views' on specific pages on my web site using URL variables ... i.e. fred.com?blah=123&that=431&how=666 ... etc

The ONLY problem with this ... is the complexity of having the user either bookmark the url to get back ... directly... or recalling the naming convention of my URL variables!  Not friendly!

Is there a way ... to DYNAMICALLY (*programmatically? [CF?]) 'point' say ....
http://www.fred.com/gwbush -> to fred.com?blah=123&that=431&how=666
such that ... when the user enters http://www.fred.com/gwbush ... they are taken to the above complicated url http://www.fred.com?blah=123&that=431&how=666

OR ... even better ...

http://gwbush.fred.com ?

I use CFmx ... and mysql ... and IIS on NTbox

Thanks!
R.
0
Comment
Question by:rcbuchanan
  • 2
4 Comments
 
LVL 9

Assisted Solution

by:CFDevHead
CFDevHead earned 400 total points
ID: 13747682
you could put something like this in the index page
<cfset site =CGI.SERVER_NAME/>
<cfif listfindnocase(site,"gwbush",".")>
      <cflocation url="http://www.fred.com?blah=123&that=431&how=666" addtoken="no">
</cfif>
0
 
LVL 7

Assisted Solution

by:andw928
andw928 earned 400 total points
ID: 13747838
There is a way to programmatically do this the results would look like this instead:

http://www.fred.com/index.cfm/blah/123/that/431/how/666

This is also more search engine friendly, ALOT more.


You can find a tutorial on this over here:

http://tutorial90.easycfm.com/

-Matt
0
 
LVL 9

Assisted Solution

by:Jerry_Pang
Jerry_Pang earned 1200 total points
ID: 13751255
hmm..

This should work also. its rather... err.. workaround..

1.)

http://www.fred.com/gwbush

create a domain called gwbush, and default the site to index.cfm
next create an index.cfm inside gwbush
---index.cfm
<cflocation url="http://www.fred.com?blah=123&that=431&how=666">

thats it.


2.)
create a list of urls to go to but you have to go to a specific page to do this..
sample
http://www.fred.com/index.cfm?goto=gwbush
http://www.fred.com/index.cfm?goto=bclinton


<cfswitch ="#URL#">
<cfcase "gwbush">
  <cflocation url="http://www.fred.com?blah=123&that=431&how=666">
</cfcase>
<cfcase "bclinton">
  <cflocation url="http://www.fred.com?blah=233&that=4451&how=646">
</cfcase>
<cfcase "bgates">
  <cflocation url="http://www.fred.com?blah=443&that=551&how=63366">
</cfcase>
<cfswitch>

this is more like fusebox methodology. all pages passes through index.cfm

3.)

http://gwbush.fred.com 
hmm.. i think this is through your Domain to redirect to another page.
create a domain gwbush.fred.com and set the default page to go to
<cflocation url="http://www.fred.com?blah=123&that=431&how=666">
0
 
LVL 9

Accepted Solution

by:
Jerry_Pang earned 1200 total points
ID: 13758534
you could also store these information in a table
LookupTable
GoFrom - Path
gwbush - http://www.fred.com?blah=123&that=431&how=666
bgates - http://www.fred.com?blah=443&that=551&how=63366

then
use
http://www.fred.com/goto.cfm?link=gwbush 

this link.cfm will query the LookupTable for  gwbush then redirects the path from the table.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month17 days, 20 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question