aboutsummaryrefslogtreecommitdiffstats
path: root/modules/phpbb/templates/forums_vhost.conf
blob: 2c7154852f62a524df00c6e7008347d5a785d1c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
    # TODO redirect based on language settings
    # and the presence of the forum
    
    # for locale redirection
    Include conf/vhosts.d/forums.d/*.conf


    # using Redirect create a loop, so we use mod_rewrite here
    RewriteEngine On
    RewriteRule ^/$ /en/ [R]
    RewriteRule ^/(..)$ /$1/ [R]

    AliasMatch ^/(..)/(.*) <%= forums_dir %>/$1/phpBB/$2

    <Directory ~ "<%= forums_dir %>/.*/phpBB/">
        Allow from all
    </Directory>

<%- 
forbidden = ['install',
             'cache',
             'includes',
             'phpbb_seo/includes',
             'store',
             'images/avatars/upload',
             'files',
             'umil/error_files',
             'gym_sitemaps/acp',
             'gym_sitemaps/sources',
             'gym_sitemaps/cache',
             'gym_sitemaps/includes',
             'gym_sitemaps/display',
             'gym_sitemaps/modules',
]
for f in forbidden
-%>
    <Directory <%= forums_dir %>/.*/phpBB/<%= f %>/ >
        Order Allow,Deny
        Deny from all
    </Directory>

<%- end -%>