Url Manager and files in the Media directory

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
11/3/2010 12:02:25 PM
Gravatar
Total Posts 130

Url Manager and files in the Media directory

Hi Joe,

I'm currently running on V 2.3.5.3 MSSQL multi-site mode. I have Site Editors who upload files using the File Manager.  When the file is linked in content via the WYSIWYG editor, this long path is inserted for the link (ex: http://mysite.com/Data/Sites/10/media/documents/gened_slo.pdf).  I'm wondering if there is a straight forward way to trim down this long path.  I attempted setting up a new mapping in the URL Manager pointing the above link to: http://mysite.com/gened_slo.pdf and got a 404 error.  I also tried mapping http://mysite.com/documents/
maps to http://mysite.com/Data/Sites/10/media/documents/ and that isn't working either.

Can you please advise me as to the best way to handle this and hopefully avoid having the directory structure of the site being visible?

Thanks,

Beth

11/3/2010 12:15:28 PM
Gravatar
Total Posts 18439

Url Manager and files in the Media directory

Hi Beth,

Sorry but I don't know a good way to mask the file path or to make it more friendly if you are hosting multiple sites in one installation.

I would not store files that have security requirements in the file system with any hopes that they will be secure by some method of obscuring their location on disk. There is nothing about the folder structure that reveals any sensitive information about the site but if you are worried about people guessing the location and name of some files and being able to download them then it sounds like the files have security needs and should not be stored in any way that people can request it by http request.

For files that you intend to be secure you can use the Shared Files feature to protect them by roles but that isn't a good solution for general user uploads and site content such as images.

Basically I would not recommend hosting different customers in a single multi site installation, to me that is more suitable for a single customer who needs multiple sites. Some people do host that way but it is not what I would do.

Best,

Joe

11/3/2010 12:31:38 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Url Manager and files in the Media directory

Hi Beth, if you are concerned with cosmetics of the URL and you don't mind using an outside intermediary, there are a lot of URL shortening services out there: bit.ly, owl.ly, goo.gl, etc. These may also provide some enhanced tracking if you care about that.

I agree with Joe, though, it's a losing battle to attempt to hide your site structure, web server, or anything else. Assume that everything about your site is publicly visible and accessible, except (hopefully) pages and other content secured by roles, and files stored by the shared files feature.

11/3/2010 12:59:50 PM
Gravatar
Total Posts 130

Re: Url Manager and files in the Media directory

Hello and thanks for the input. I am looking at it from a cosmetic point of view and am confused that the URL Manager doesn't do the trick because I am able to have virtual directory point to an aspx file.

Best,

Beth

11/3/2010 1:06:43 PM
Gravatar
Total Posts 18439

Re: Url Manager and files in the Media directory

It is possible to do it for individual files using the mojo url manager but that would be tedious if you need to make pretty urls for a lot of files. It would require the same configuration as is needed for extensionless urls so that .NET handles requests for all the files.

If you have control of the server you could probably do pattern based url re-writing using the free Url Re-Writing module for IIS 7.x, it can be installed form the web platform installer. This re-writing would happen before mojoPortal gets the request.

Best,

Joe

11/3/2010 1:08:57 PM
Gravatar
Total Posts 18439

Re: Url Manager and files in the Media directory

Actually I take it back, the code in our url rewriter is specifically not handling common static file extensions, but it could be done with the IIS module I mentioned.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.