Site structure
Version 7.x > Site structure > Access file under extensionless setting View modes: 
User avatar
Member
Member
seanbun - 2/7/2013 1:14:52 AM
   
Access file under extensionless setting
I have followed the dev guide and set up extensionless Urls by add below tag in the web.config
<modules runAllManagedModulesForAllRequests="true">

But now when I try to get a physical file like the path below. I have 404 error.

http://[domain]custom/[site]/[medialibrary]/[folder]/example.jpg

Is there any setting I have missed? Please advise. Thank you.

User avatar
Kentico Support
Kentico Support
kentico_janh - 2/7/2013 1:30:39 AM
   
RE:Access file under extensionless setting
Hello,

Have you also followed instruction from point 4?

http://devnet.kentico.com/docs/devguide/index.html?configuration_of_custom_url_extensions.htm

If so, what happens when you access that url without the .jpg extension? What happens if you change the .jpg extension to .aspx one?

Best regards,
Jan Hermann

User avatar
Member
Member
seanbun - 2/11/2013 4:10:51 PM
   
RE:Access file under extensionless setting
Thanks Jan.

I finally used the Excluding Url in the Url and SEO setting to resolve this problem.

User avatar
Kentico Support
Kentico Support
kentico_janh - 2/12/2013 1:23:32 AM
   
RE:Access file under extensionless setting
Hello,

This could be a solution as well, because when you exclude some file or directory by filling that property, then Kentico doesn't handle files within that directory and those files are provided directly by IIS, so you can't get Kentico's 404 page and if that file exists, IIS returns it properly.

Best regards,
Jan Hermann

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 2/27/2013 2:10:05 PM
   
RE:Access file under extensionless setting
Is there any reason you couldn't use the built in methods already created to get the item in the media library?

User avatar
Member
Member
seanbun - 2/27/2013 4:16:01 PM
   
RE:Access file under extensionless setting
For these static files, they could be accessed directly without involving database. Just help reducing the database workload to help the performance.

User avatar
Member
Member
egarrison-wte - 3/25/2013 8:58:57 AM
   
RE:Access file under extensionless setting
Did you find a solution to this?

I want to have an external process FTP files to /uploads and have some files outside of the framework. When I access files from the directory with .JPG, I get a 404. I put a .aspx file there with just Hello World text and the file opens fine. It would appear the framework is taking the request and giving error.

I did put the into the Excluded URLs : /Uploads/;

Any suggestions on how to make it bypass?

User avatar
Member
Member
seanbun - 3/25/2013 3:08:34 PM
   
RE:Access file under extensionless setting
is the FTP process file inside the /Uploads/ folder as well? otherwise, you need to add the path to the Excluded Urls as well.

User avatar
Member
Member
egarrison-wte - 3/25/2013 7:57:01 PM
   
RE:Access file under extensionless setting
The files are right in /upload

/upload/apple.jpg - Gives a 404 error. Even with it in the excludes folder.


User avatar
Kentico Support
Kentico Support
kentico_janh - 3/27/2013 5:37:17 AM
   
RE:Access file under extensionless setting
Hello,

Is the upload folder in the root of your project folder? If so, could you please set the /upload/ (case-sensitive) value to the Excluded URLs property (please make sure your site settings inherit this setting).

Best regards,
Jan Hermann