Dynamic URLS?

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.
rcbuchananAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
CFDevHeadCommented:
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
 
andw928Commented:
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
 
Jerry_PangCommented:
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
 
Jerry_PangCommented:
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

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.