Friendly URLs for file downloads

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.
1/22/2013 3:56:04 AM
Gravatar
Total Posts 38

Friendly URLs for file downloads

Hi, I've got a couple of queries about friendly urls

1.  Can I create a friendly url for a folder, and let it resolve for all files in that location?  

I have enter a friend url (for example) ​"http://mydomain.com/downloads". against an extant url  of "http://mydomain.com/Data/Sites/[x]/downloads/".

I upload a file "myfile.txt" to that location, and try to retrieve it as "http://mydomain.com/downloads/myfile.txt"

​I tried this and I get a broken link message from the browser (not from mojoportal).  If I type the folder url in the browser it displays no content, which is expected, but throws no error either.  

I assume I'll have to create friendly links for each file.  Please let me know if there is a way of avoiding work :)

​2.  I have access to a CDN.  Can I issue friendly urls to offsite content?

 

Thanks

 

Ken

 

PS.  Who is www.mojoportal.co.uk?

 

1/22/2013 10:41:48 AM
Gravatar
Total Posts 2253

Re: Friendly URLs for file downloads

Hi,

There isn't a way to do this in mojoPortal but IIS provides a couple of methods.

  1. Create a Virtual Directory named "downloads" pointing to \Data\Sites\[x]\downloads. A request for http://www.yoursite.url/downloads/somefile.ext will retrieve \Data\Sites\[x]\downloads\somefile.ext. The user will never see the /data/sites/[x]/downloads path.
  2. Use the IIS URL Rewrite Extension to rewrite a request for http://www.yoursite.url/downloads/somefile.ext to http://www.yoursite.url/data/sites/[x]/downloads/somefile.ext. Again, the user never sees the actual URL.

If you're using a hosted server that you don't have control over, you may not be able to use the URL Rewrite Extension because your hosting provider may not have it installed. Most hosting providers allow create of Virtual Directories so that shouldn't be a problem if you decide to go that route.

I don't know who mojoPortal.co.uk is but I know they're not officially connected to mojoPortal in any way.

HTH,
Joe D.

1/22/2013 10:54:52 AM
Gravatar
Total Posts 38

Re: Friendly URLs for file downloads

Thank you for your assistance...

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