SitePoint Sponsor

User Tag List

Results 1 to 16 of 16
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2012
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question .cfx Custom URL Rewrite/Extension? (CARFAX)

    Hi all,

    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:

    • www.carfax.com/phoenix/vehicle_history/SampleReport.cfx?reportName=oneOwnerCleanLateModel
    • www.carfax.com/used_car_classifieds/hotListingsSearch.cfx
    • https://secure.carfax.com/creditCard.cfx?partnerCode=CAR&partnerSiteLocation=0
    • https://secured.carfax.com/organizer/login.cfx
    • http://www.carfax.com/entry.cfx


    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)?

    Thanks!

    - Pam
    Last edited by Mittineague; Jul 9, 2012 at 13:31. Reason: OP forgot to turn off auto-link

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,629
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    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.

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2012
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    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.

  4. #4
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    357
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    .cfx files are from coldfusion afaik

    http://en.wikipedia.org/wiki/ColdFusion
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon

  5. #5
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,629
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    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.

  6. #6
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    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 --

    http://rudy.ca/about.htm
    http://rudy.ca/about.html
    http://rudy.ca/about.cfx
    http://rudy.ca/about.cfm
    http://rudy.ca/about.foo
    http://rudy.ca/about

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  7. #7
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    357
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    coldfusion extension is .cfm
    I was close, anyway
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon

  8. #8
    SitePoint Zealot
    Join Date
    Mar 2012
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    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 --

    http://rudy.ca/about.htm
    http://rudy.ca/about.html
    http://rudy.ca/about.cfx
    http://rudy.ca/about.cfm
    http://rudy.ca/about.foo
    http://rudy.ca/about

    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?

  9. #9
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Pamela1991 View Post
    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
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  10. #10
    SitePoint Zealot
    Join Date
    Mar 2012
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    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?

  11. #11
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Pamela1991 View Post
    Did I get that right?
    not quite, but more or less, sort of
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  12. #12
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,629
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    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
    You know you can just do extensionless pipelines in IIS 7 and not have to do custom 404 handler tricks.

  13. #13
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    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
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  14. #14
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,629
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    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.

  15. #15
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    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
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  16. #16
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,629
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    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.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •