# /www/.htaccess file


# if mod_perl is loaded
<IfModule mod_perl.c>

    # require application module  [1]
    # change this path as needed
    PerlRequire /perl_side_include/lib/MagicWebApp.pm
    
    # just for '*.html' files     [2]
    <FilesMatch "\.html$">
    
        SetHandler perl-script

        # mod_perl 1              [3]
        <IfDefine !MODPERL2>
            PerlHandler MagicWebApp
        </IfDefine>
        
        # mod_perl 2
        <IfDefine MODPERL2>
            PerlResponseHandler MagicWebApp
        </IfDefine>
        
    </FilesMatch>
                                           
</IfModule>



# [1] You can use 'PerlModule MagicWebApp' directive too,
# if your module is in a dir of mod_perl @INC,
# or you can omit both if you load the module
# in startup.pl file

# [2] you can choose a different suffix like '.phtm'
# that stands for 'perl-html', or '.mhtm'that stands
# for 'magic-html', or '.mp' that stand for 'magic-page'.
# The tm_suffix property will be set to this suffix
# You can also omith the 'FilesMatch' container if you
# don't need to restrict the parsing to just some files

# [3] remember that mod perl 2 uses 'PerlResponseHandler'
# instead of 'PerlHandler'
