Remap

hello


just a quick question - can you remap PDF's … so if a user put in this URL



wwww.name.com.au/__data/assets/pdf_file/0020/11111/Pdf file n1.pdf



they go to this URL - I have put this in the remap manager and it does not work…



wwww.name.com.au/__data/assets/pdf_file/0020/11111/pdf file n2.pdf



Rgds



Angela

[quote]
hello



just a quick question - can you remap PDF's … so if a user put in this URL



wwww.name.com.au/__data/assets/pdf_file/0020/11111/Pdf file n1.pdf



they go to this URL - I have put this in the remap manager and it does not work…



wwww.name.com.au/__data/assets/pdf_file/0020/11111/pdf file n2.pdf



Rgds



Angela

[/quote]





Hi Angela,

The __data type of URL are directly served by Apache. Matrix doesn't do any processing whatsoever for these URL. And since Matrix isn't involved…remap wouldn't work. If you want the remap to work, you will have to set 'Allow Unrestricted Access' to 'No' on the details screen of the PDF file asset(not this will change the url from __data one to regular URL) and then you should be able to apply the remap.



Hope this helps.



Ash

[quote]
Hi Angela,

The __data type of URL are directly served by Apache. Matrix doesn't do any processing whatsoever for these URL. And since Matrix isn't involved…remap wouldn't work. If you want the remap to work, you will have to set 'Allow Unrestricted Access' to 'No' on the details screen of the PDF file asset(not this will change the url from __data one to regular URL) and then you should be able to apply the remap.



Hope this helps.



Ash

[/quote]



Thanks Ash - that will explain why it is not working.

[quote]
Thanks Ash - that will explain why it is not working.

[/quote]



No Problemo. Glad I could help. :slight_smile:

[quote]
No Problemo. Glad I could help. :slight_smile:

[/quote]





Does changing Allow Unrestricted Access' to 'No' change anything - what is the impact if we did this to all of our PDFs etc…

[quote]
Does changing Allow Unrestricted Access’ to ‘No’ change anything - what is the impact if we did this to all of our PDFs etc…

[/quote]



Check out ‘Allow Unrestricted Access’ heading on the manuals page.

This should give you a fair idea as to what it does.



Ash

[quote]
Check out ‘Allow Unrestricted Access’ heading on the manuals page.

This should give you a fair idea as to what it does.



Ash

[/quote]





Thanks for the info, but I was wondering what the risks were in setting this to no. I would prefer to have human friendly URLS but the manual does not tell me the risks in having either option.



Rgds



Angela

[quote]
Thanks for the info, but I was wondering what the risks were in setting this to no. I would prefer to have human friendly URLS but the manual does not tell me the risks in having either option.



Rgds



Angela

[/quote]



There is no real risk there. The main issue is the performance. Severing it via Apache directly is lot quicker. Can't really think of any security risk to be frank.



Ash

[quote]
There is no real risk there. The main issue is the performance. Severing it via Apache directly is lot quicker. Can't really think of any security risk to be frank.



Ash

[/quote]





Is there a way we change the default to No for PDFs and documents.

[quote]
Is there a way we change the default to No for PDFs and documents.

[/quote]

Hi Angela,

There is no global preference to do this but there is a script to change the option:

[SYSTEM_ROOT]/scripts/set_files_unrestricted.php



Ash

[quote]
Hi Angela,

There is no global preference to do this but there is a script to change the option:

[SYSTEM_ROOT]/scripts/set_files_unrestricted.php



Ash

[/quote]





I would prefer design files etc to stay delivered by Apache, does the script change the preferences for certain filetypes OR is it a all or nothing change :slight_smile:

[quote]
I would prefer design files etc to stay delivered by Apache, does the script change the preferences for certain filetypes OR is it a all or nothing change :slight_smile:

[/quote]



It lets you pick a Root node under which all the file type asset will be changes. Extract from the script :

    * Purpose
    *    Script to set all files underneath a certain root node to either
    *    "restricted" or "unrestricted". Files marked "unrestricted", are of Live
    *    status or higher, and have public read permissions are directly through
    *    the web server (using the __data alias), instead of being passed through
    *    MySource Matrix.
    *
    * Synopsis
    *    php set_files_unrestricted.php   
    *      - system_root  : the filesystem root of the MySource Matrix installation
    *      - root_assetid : asset ID of the root node to change from
    *      - setting      : 1 to set unrestricted, 0 to set restricted