Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6922453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:24:29+00:00 2026-05-27T10:24:29+00:00

CFWheels has the URLFor() function for getting the internal URL based on supplied arguments.

  • 0

CFWheels has the URLFor() function for getting the internal URL based on supplied arguments. Is there a way to get the internal URL without supplying any arguments?

For example:
Given a user navigates to “http://somedomain.com” or “http://somedomain.com/about/” or “http://somedomain.com/contact/” is there a method like ReWrittenURL() that returns something like “/” or “/about/” or “/contact/”?

Using URLFor() with no arguments returns “/home/index” or “/about/index” or “/contact/index”.

CGI.SCRIPT_NAME returns “/rewrite.cfm”

Obviously with Javascript using document.location.href I can get what I’m after.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:24:30+00:00Added an answer on May 27, 2026 at 10:24 am

    Does CGI.path_info have the value you’re looking for?

    edit

    At first, I deleted this post, being utterly confounded. Now I’ve done a little test – I downloaded the latest wheels core files (1.1.6), extracted to an IIS 7.5 (with URL Rewrite module installed) + CF9 webserver, and edited the “web.config” file in the core root, setting “enabled=’true'” for the rewrite rule. Also, since I was running this example from a subfolder, I changed the path from “/rewrite.cfm” to just “rewrite.cfm”. This got me to the point where I was able to successfully requests urls like this:

    http://server/wheelstest/wheels/wheels

    From here, I edited the layout.cfm under views/wheels, adding:

    <cfdump var="#cgi#">
    

    When I then request the above URL (/wheelstest/wheels/wheels), I see the dump for the cgi scope. Under path_info, this is the value: /wheels/wheels.

    Next, I added a blank “index.cfm” file under views/wheels.

    When I request /wheelstest/wheels, I get this for path_info: “/wheels”.

    When I request /wheelstest/wheels/, I get this for path_info: “/wheels/”.

    When I request /wheelstest/wheels/index, I get this for path_info: “/wheels/index”.

    When I request /wheelstest/wheels/index/, I get this for path_info: “/wheels/index/”.

    So basically – cgi.path_info is doing for me exactly what you describe you want. What is different about your setup than mine, such that it isn’t returning that value for you?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I configure CFWheels to display the following XML at http://mydomain.com/sitemap.xml ? <?xml
I am working with CFWheels and jquery mobile and am trying to pass some
I've been following the information from here: cfwheels.org/docs/1-1/chapter/nested-properties I've ended up downloading a sample
What would be the correct way of unit testing a controller action that performs
I've spent the last couple of months on and off with CFwhees. There's a
I can't seem to figure out how to create pages in CFWheels with clean
I have searched Google and abroad and I cannot find anything about CFWheels Unit
I have a problem with saving a huge amount of records to database using
I am working on an application where all user authentication happens in a ColdFusion
I recently starting learning test driven development, namely MXUnit, and I love the idea's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.