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 130815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:00:27+00:00 2026-05-11T06:00:27+00:00

Let’s say, on a ColdFusion site, that the user has navigated to http://www.example.com/sub1/ The

  • 0

Let’s say, on a ColdFusion site, that the user has navigated to http://www.example.com/sub1/

The server-side code typically used to tell you what URL the user is at, looks like: http://#cgi.server_name##cgi.script_name#?#cgi.query_string#

however, ‘cgi.script_name’ automatically includes the default cfm file for that folder- eg, that code, when parsed and expanded, is going to show us ‘http://www.example.com/sub1/index.cfm‘

So, whether the user is visiting sub1/index.cfm or sub1/, the ‘cgi.script_name’ var is going to include that ‘index.cfm’.

The question is, how does one figure out which URL the user actually visited? This question is mostly for SEO-purposes- It’s often preferable to 301 redirect ‘/index.cfm’ to ‘/’ to make sure there’s only one URL for any piece of content- Since this is mostly for the benefit of spiders, javascript isn’t an appropriate solution in this case. Also, assume one does not have access to isapi_rewrite or mod_rewrite- The question is how to achieve this within ColdFusion, specifically.

  • 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. 2026-05-11T06:00:27+00:00Added an answer on May 11, 2026 at 6:00 am

    I suppose this won’t be possible.

    If the client requests ‘GET /’, it will be translated by the web server to ‘GET /{whatever-default-file-exists-fist}’ before ColdFusion even gets invoked. (This is necessary for the web server to know that ColdFusion has to be invoked in the first place!)

    From ColdFusion’s (or any application server’s) perspective, the client requested ‘GET /index.cfm’, and that’s what you see in #CGI#.

    As you’ve pointed out yourself, it would be possible to make a distinction by using a URL-rewriting tool. Since you specifically excluded that path, I can only say that you’re out of luck here.

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

Sidebar

Related Questions

Let's say I query for http://images.google.com.sg/images?q=sky&imgcolor=black and I get all the black color sky,
Let's say we have a table that has 2 million rows. It has two
Let's say I have a structure named vertex with a method that adds two
Let's assume that we are building a high traffic site that will be used
Let's say I have the following text: (example) <table> <tr> <td> <span>col1</span> </td> <td>col2</td>
Let's say I have an facebook application running using the JS SDK. First user
Let's say I have multiple requirements for a password. The first is that the
Let's assume that a user votes for some movies in a scale of 1
Let's say that I have a date in R and it's formatted as follows.
Let me try to explain what I need. I have a server that is

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.