-3

I'm working with Coldfusion (because I have to) and we use iPlanet 7 (because we have to), and I would like to pass clean URL's instead of the query-param junk (for numerous reasons). My problem is I don't have access to the overall obj.conf file, and was wondering if there were .htaccess equivalents I could pass on the fly per directory. Currently I am using Application.cfc to force the server to look at index.cfm in root before loading the requested page, but this requires a .cfm file is passed, so it just 404's out if the user provides /path/to/file but no extension. Ultimately, I would like to allow the user to pass domain.com/path/to/file but serve domain.com/index.cfm?q1=path&q2=to&q3=file. Any ideas?

Jeffrey Kemp
  • 59,135
  • 14
  • 106
  • 158
Ryan
  • 11
  • 4

2 Answers2

3

You can mod_dir with the DirectoryIndex directive to set which page is served on /directory/ requests.

http://httpd.apache.org/docs/2.2/mod/mod_dir.html

Mark Mandel
  • 1,316
  • 9
  • 17
  • I'm not sure how to use mod_dir on iplanet since I have no httpd config and the obj.conf is at the server layer, which I have no access to. I was looking for something a little more flexible akin to .htaccess so I could simply turn URL rewrite on or off. – Ryan Aug 11 '11 at 12:49
0

I'm not sure what exists for iPlanet, haven't had to work with it before. But it would be possible to use a url like index.cfm/path/to/file, and pull the extra path information via the cgi.path_info variable. Not exactly what you're looking for, but cleaner that query-params.

Ryan McIlmoyl
  • 231
  • 2
  • 6
  • This is what I have been thinking of doing, and it makes sense, so I am going to go ahead and use it, thank you. – Ryan Aug 11 '11 at 12:49
  • There are a few CF frameworks out there for building RESTful APIs that you may want to take a look at as well. PowerNap and Taffy are the two that come to mind (http://powernap.riaforge.com and http://taffy.riaforge.com) – Ryan McIlmoyl Aug 11 '11 at 13:12
  • The .cfm hack works great, can't use frameworks since the computer is a classified machine and it takes months to get any new software on the server. – Ryan Aug 12 '11 at 02:42