Forum Moderators: open

Message Too Old, No Replies

404 Error with trailing slashes in URL

         

natg504

7:09 pm on Jul 20, 2010 (gmt 0)

10+ Year Member



I have a web application I'm trying to install that has URLs in the format of http://www.example.com/subdir/index.cfm/about-us/ Every time I go to a page with something after the .cfm extension in the URL, and ending in a /, like "/about-us/", I get a 404 error.

I know that our server is set up to read URLs like this without the trailing slash because something like http://www.example.com/subdir/post.cfm/about-us will work, but as soon as I add the / at the end, I get the 404 error. We need to have the ability to read URLs with slashes at the end because we're setting up this new application that uses those very frequently.

Are there any IIS 6 settings or mappings that we might need to set up?

Thanks,

[edited by: Ocean10000 at 2:33 pm (utc) on Jul 21, 2010]
[edit reason] Making URLS Readable to make it easier to understand [/edit]

Ocean10000

2:42 pm on Jul 21, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I believe it has to do with a mapping directive in web.xml which is used by ColdFusion to determine what files to process or hand off to IIS.

natg504

4:53 pm on Jul 21, 2010 (gmt 0)

10+ Year Member



Thanks. We already have the following code un-commented. Is this what you are referring to?

<!-- begin SES -->
<servlet-mapping id="coldfusion_mapping_6">
<servlet-name>CfmServlet</servlet-name>
<url-pattern>*.cfml/*</url-pattern>
</servlet-mapping>
<servlet-mapping id="coldfusion_mapping_7">
<servlet-name>CfmServlet</servlet-name>
<url-pattern>*.cfm/*</url-pattern>
</servlet-mapping>
<servlet-mapping id="coldfusion_mapping_8">
<servlet-name>CfmServlet</servlet-name>
<url-pattern>*.cfc/*</url-pattern>
</servlet-mapping>
<!-- end SES -->

Ocean10000

7:29 pm on Jul 21, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes that is what I was referring too. The ones you pasted look like they should cover it from a ColdFusion angle.

Can you check your weblogs to see if when you are trying to access "/about-us/" its not being smart and trying to access "/about-us/default.html" which it can not find. Check under the documents tab in IIS Manager for that website to add default.cfm at the top of the list as a work around and see if it will work then.