axew3.com

phpBB images and .htaccess:
how to set phpBB avatars images available over all your domain

by

On Apache server, the default phpBB .htaccess file in phpBB/images/avatars/upload folder, by default, is setup to deny access to images files if these are requested by an external resource, or the call to images files are done outside the phpBB installation folder.

So, to get working WP_w3all avatar option, it is required to edit the default .htaccess file of phpBB that reside inside phpBB/images/avatars/upload folder, setting it to serve images for requests that are done within your domain(s) or localhost test server. You could also remove or disable the .htaccess, but you are noticed that in this case, images on this folder if linked from external sites, are accessible.

The default phpBB/images/avatars/upload/.htaccess file look like this:

<Files *>
	Order Allow,Deny
	Deny from All
</Files>

so you’ll edit it, allowing instead requests that are done from your host with something like this (this first example is for localhost):

<Files *>
	Order deny,allow
	Deny from All
	Allow from 127.0.0.1
        Allow from ::1
</Files>

this example instead is for an online site:

<Files *>
Order deny,allow
Deny from all
Allow from axew3.com
</Files>

on Unix/Linux systems, you may also check for correct folder chmod in case the above still not let you to get available avatars, from the phpBB avatar’s folder.

Comments

One response to “phpBB images and .htaccess:
how to set phpBB avatars images available over all your domain”

  1. mikotoiii Avatar

    On some hosts, you may find that this will not work, even if you set the chmod to 777 (755 should be fine for folder permissions). You can find out the referer, and allow access to that. This will make it so that your pictures can’t be accessed directly through the browser or any other site, but can be accessed by WordPress.

    SetEnvIf Referer MyDomain.com internal

    Order deny,allow
    Deny from all
    Allow from env=internal