This content has been marked as final. Show 10 replies
If you are using unix / linux servers then you may use the "ln" command and through that you can create "Symbolic links" which look like directories which are actually act as links to one common directory..
The easiest to implement would be to parse the cgi.path_info. Though not exactly like the MySpace site, the url would include an index.cfm as part of the pathing.
Look at the ParseURLData UDF at http://www.cflib.org/udf.cfm?ID=378
A little more complicated is to use something like Mod_rewrite ( http://www.google.com/search?hl=en&q=IIS+mod+rewrite ) which would be handled at the web server.
I'm looking for the same thing. Any way to do it through Cold Fusion and not IIS?
Could you have CF read the url first?
<cfif SCRIPT_NAME listcontainsNoCase(application1)>
Len( http://www.myspace.com/application3/) - Right (myuniquename/)
The code above is choppy and would need some cleanup But you get the idea...
Would it work?
Yes ISAPI rewrite on IIS or Mod_Rewrite on Apache. They are both designed to do exactly this rather than a hack, bear in mind the cgi.path_info wont work on some web server set ups.
I'm on a host and don't have access to the web server.
Sorry - I replied to the wrong forum.
Then only the http://www.myClone.com/index.cfm/myUniqueName will work. I would find a host that has Apache and lets you set RewriteRules. It is incredibly powerful and can do much more than just the aforementioned pattern matching!
Actually a technique we use is a 404 redirect. Meaning upon any given url not being found for a site ie. www.blah.com/fake directory/. IIS takes that 404 error and sends it to CF, on that CF page you take the cgiQuerystring.. do some logic and then either display your info or do a cflocation redirect.
This sounds like a good method. How do you check for the bad directory name?