https://bugzilla.wikimedia.org/show_bug.cgi?id=65220

--- Comment #4 from [email protected] ---
With this work:

RewriteEngine On

RewriteCond %{QUERY_STRING} \.[^\\/:*?\x22<>|%]+(#|\?|$) [nocase]
RewriteRule . - [forbidden]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l
RewriteRule ^thumb/[0-9a-f]/[0-9a-f][0-9a-f]/[^/]+/[^/]+$ /thumb_handler.php
[L,QSA]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l
RewriteRule ^thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/[^/]+/[^/]+$
/thumb_handler.php [L,QSA]


/images/thumb/7/7d/111.jpg?.fdfdf - 403 Forbidden
/images/thumb/7/7d/111.jpg - 200 Ok

Looks like if in subfolder exists .htaccess then .htaccess in parent folder
ignored.

From
http://www.helicontech.com/forum/13329-htaccess_rootchild_not_working.html:

Now I understand the problem. This is by design behavior we implemented exactly
as it is in Apache. Lower .htaccess files completely owerride upper
configurations unless you put "RewriteOptions inherit" into it. If no .htaccess
specified, the closest upper one will be executed. Also Apache always executes
httpd.conf file. This behavor can be changed of caurse, but we will loose
Apache compatibility then.
Also if inherit options is used it means that all directives will be moved into
this file from the upper file and will be applied in the context of the lower
file. This is also Apache behavior.
So if you write .htaccess and want include rules from upper file you need to
use inherit option. If no .htaccess file exists, your upper rules will be
applied.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to