• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 How to make a directory in /library folder publicly accessible?

Mike

XenForo developer
Staff member
#2
The short answer is really that you don't/shouldn't. Anything that needs to be publicly accessible should be elsewhere. If it's a PHP script, it should go in the root directory generally.
 

RSI

Active member
#4
I agree with Mike, but if you must you have to edit your .htaccess file within the library folder. Mainly you don't want to give read access to your
config.php file or to your add-on folders there either. You would probably need to create new .htaccess files in each of the add-on folders to stop it there and then add the code to your .htaccess file in your sites main root directory to protect the config.php file.

The below is what stops it in the library folder.
Code:
Order deny,allow
Deny from all
Then add this to your main .htaccess file in you sites main root directory.
Code:
# START CONFIG PROTECTION
<FilesMatch "config.php">
deny from all
</FilesMatch>
# END CONFIG PROTECTION
Again, not a good idea or recommended.
.
 
Last edited: