I was just now on the CARFAX website. As I glanced at the url's, strangely enough, I saw a ".cfx" extension!
What on earth is this? I originally thought they did some kind of url rewriting similar to Wordpress, but then I saw that they actually even have "?keyword=" after some of the pages! Does that mean these are actually PHP or ASPX pages combined with some kind of url rewriting?
Here are some example url's from the site:
I am finding this quite mind-boggling. Does anyone have any idea what this is? Does this mean that I can make a website and have pages like about.pam, contact.pam, etc. (or any other however many letter combination I so desired)?
The site itself is run on JSP it seems -- "X-Powered-By:Servlet/2.4 JSP/2.0". My bet is they are mapping .cfx into a custom servlet engine of some sort, or using it on the front-end to make it easy for the load balancers to spot the URLS that should go to the app servers versus the static servers.
Yes, you can do whatever you want with extensions and a little creativity pretty easily.
Thanks wwb_99! I'm going to have to try this out some time.
.cfx files are from coldfusion afaik
I kinda suspected that -- whitespace at the top of the page when you view source hints at it. But I hadn't seen a .cfx extension and one usually sees some indication of coldfusion in the headers. So I'm not entirely convinced.
coldfusion extension is .cfm
(disclaimer: i'm still writing coldfusion 4.5 code, even though my site is on coldfusion 9, so i may have missed seeing some new features like a new file extension)
i strongly suspect that .cfx is actually the "carfax" extension
it's actually not that hard to set up a site which can handle non-standard extensions
for example (and i hope you guys won't mind links to my own site here for demonstrative purposes), all of the following urls work just fine --
coldfusion extension is .cfm
I was close, anyway
I had thought the way to do this was by using htaccess, but how exactly did you make these different pages with the various extensions?
they aren't different pages at all, they're all the same page
i don't use htaccess, i have a custom 404 handler that just uses the file name and disregards the extension
Ah, OK. Then this method differs from using htaccess in that htaccess changes the URL however it is customized to be (so that a page will by default be about.cfx instead of about.html, for example) whereas custom 404 handling finds a page that the user is trying to access so that if the original page is about.html but the user tries to go to about.anythingelse, the extension will always be perceived as .html.
Did I get that right?
not quite, but more or less, sort of
You know you can just do extensionless pipelines in IIS 7 and not have to do custom 404 handler tricks.
no, i don't
i don't even know what that means
i use a 404 handler because none of my pages actually exist, they're just entries in my database
What you are doing is really called URL routing. In IIS, before IIS7, you often had to resort to using the 404 page to forward all requests to your front controller as, unless you were on a dedicated host, you could typically not enable a wildcard handler.
With IIS7 you can just say "send any request to this site to coldfusion's ISAPI extension" and not have to punch through the 404 page to get the request into the coldfusion pipeline.
i think i sort of followed that
however, on my host, i use a "cpanel" -- my 404 handler doesn't "punch through" to the coldfusion pipeline, it ~is~ the coldfusion pipeline
that way, ~all~ requests automatically go through there, both existing articles and genuine crap urls (404s)
that's because i don't have any actual .html pages
note, though, that i can (and occasionally do) drop an actual .html page into the site, and then of course coldfusion doesn't get called at all
whereas with your setup, where you get iis to hand off everything to coldfusion, it would hand off the .html page as well, which seems kind of pointless
if i understood what you said
in any case, i don't have authority to configure iis, i'm on a shared host
Actually, you have quite a bit more ability to configure actually -- all of this setup can be done in the web.config file, not locked away in the metabase which required RDP access and elevated privileges to access.
I struggle to think of the last time I put a .html page on an app server but that is probably me.
This topic is now closed. New replies are no longer allowed.