<IfModule mod_rewrite.c>
    RewriteBase /programm

    RewriteEngine on
    RewriteCond  %{REQUEST_FILENAME} -f
    RewriteRule (.*) $1 [L]
    RewriteCond  %{REQUEST_FILENAME} -d
    RewriteRule (.*) $1 [L]

    RewriteRule ^kalender/(\d{4}-\d{2}-\d{2})_(\d{4}-\d{2}-\d{2})\.html[\?]?(.*)$	/agenda/aggregate.cgi?from_date=$1&till_date=$2&$3 [L]
    RewriteRule ^kalender/(\d{4}-\d{2}-\d{2})\.html[\?]?(.*)$          		/agenda/aggregate.cgi?date=$1&$2 [L]
    RewriteRule ^sendungen/(\d{4}-\d{2}-\d{2})\.html[\?]?(.*)$         		/agenda/aggregate.cgi?date=$1&$2 [L]
    #  RewriteRule ^sendung/(\d+)\.html/[^&]*(&.*)?$                  		/agenda/aggregate.cgi?event_id=$1&$2 [L]
    RewriteRule ^sendung/(\d+)\.html[\?]?(.*)$                                 	/agenda/aggregate.cgi?event_id=$1&$2 [L]
    RewriteRule ^sendung/serie_plus/(\d+)\.html[\?]?(.*)$                         /agenda/aggregate.cgi?next_series=$1&$2 [L]
    RewriteRule ^sendung/serie_minus/(\d+)\.html[\?]?(.*)$                        /agenda/aggregate.cgi?previous_series=$1&$2 [L]
</IfModule>

Options -Indexes +FollowSymLinks +MultiViews +ExecCGI

<IfModule mod_perl.c>
    <FilesMatch "\.cgi$">   
        SetHandler perl-script
        PerlHandler ModPerl::RegistryPrefork
        PerlSendHeader On 
        Options +ExecCGI
    </FilesMatch>
</IfModule>

<IfModule !mod_perl.c>
	AddHandler cgi-script .cgi .pl
</IfModule>

Require all granted

