MyBB Community Forums

Full Version: Avatar directory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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?
(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
(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.
Thanks I think this should work.