This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » General » [Resolved]Disable access by URL to...
expandshrink

[Resolved]Disable access by URL to media on frontend

[Resolved]Disable access by URL to media on frontend

Friday 01 May 2009 5:54:46 pm - 4 replies

Hello,

I did a website with a lot of images and PDF files. This files are located in the media section. I gave access for content/read("standard", "media"blunk.gif Emoticon to the anonymous members so they can read content and media files.

But my problem is that with this configuration each user can go to www.mysite.com/Media and the media Folder is shown.

Can I disable this ?

You can have a live demo here : http://www.smsa.ch/Media blunk.gif Emoticon

Thanks for help !

Modified on Thursday 07 May 2009 11:24:38 am by Alain Sahli

Saturday 02 May 2009 11:26:01 am

Bonjour Alain,

i know that issue. It's probably one of "those-who-must-not-be-talked-about" blunk.gif Emoticon
I think, you cannot do this by read-rules, as these usually refer to the objects. As soon as you disallow read access to these objects, they will not be shown in the articles...

My suggestion: you should try to override the full-view-templates of the folder class, the image class and the file class IN the media section only (override condition: "section=media"blunk.gif Emoticon

Saturday 02 May 2009 12:00:36 pm

Hi,

On the other hand you can always filter out Media urls with rewrite rules in .htaccess

Sunday 03 May 2009 10:41:04 am

Besides marking as invisible the Media folder, which would not work as all its children would be hidden too, you can simply set it to a "reserved" section, that is not visible to anon user (ie. he has no content/read access to that section). You then switch back to the "media" section to all children of media, and you should be done

Thursday 07 May 2009 11:24:19 am

I did a rewrite rule in my .htaccess file. It works fine, thanks !

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from