MyBB Community Forums
[How To?] Avatar directory - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: [How To?] Avatar directory (/thread-226072.html)



Avatar directory - Seeker-Smith - 2020-01-15

I'd like to use .htaccess in the uploads and video directories to deny from all which still allows php to provide the attachment but avatars within uploads don't work. The auth box pops up. Can I move the avatars directory the site root and how to?

Many thanks,
Peter


RE: Avatar directory - User 129272 - 2020-01-15

Hello,
I believe doing that would require a lot of core edits and cause a whole bunch of compatibility issues; are you sure there's no other solution? Why do that in the first place?


RE: Avatar directory - Seeker-Smith - 2020-01-15

(2020-01-15, 10:21 PM)mTurtle_ Wrote: Hello,
I believe doing that would require a lot of core edits and cause a whole bunch of compatibility issues; are you sure there's no other solution? Why do that in the first place?

I have 265,000 attachments. I really don't want my upload directory being used by the would. I'm not sure if I can but turning off avatars my be a solution.

Or I my be able to deny from all in uploads but allow from all in avatars. Seems to me .htaccess may have that posibility.

With VB you store attachments out of root but all other images are in the web root.

Cheers and thanks for the response.
Peter


RE: Avatar directory - Crazycat - 2020-01-15

Did you try this tip : https://electrictoolbox.com/apache-remove-password-protection-subdirectory/ ?


RE: Avatar directory - User 129272 - 2020-01-15

(2020-01-15, 10:29 PM)Seeker-Smith Wrote:
(2020-01-15, 10:21 PM)mTurtle_ Wrote: Hello,
I believe doing that would require a lot of core edits and cause a whole bunch of compatibility issues; are you sure there's no other solution? Why do that in the first place?

I have 265,000 attachments. I really don't want my upload directory being used by the would. I'm not sure if I can but turning off avatars my be a solution.

Or I my be able to deny from all in uploads but allow from all in avatars. Seems to me .htaccess may have that posibility.

With VB you store attachments out of root but all other images are in the web root.

Cheers and thanks for the response.
Peter

I believe you could add a directive specifically for the avatars directory like this:
<Directory "avatars/">
    ...
</Directory>

Edit: Please check Crazycat's answer above as well.


RE: Avatar directory - Seeker-Smith - 2020-01-15

Thanks I think this should work.