<VirtualHost *:80>
DocumentRoot "/usr/local/shorten/htdocs"
<Directory "/usr/local/shorten/htdocs">
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "/usr/local/shorten/cgi">
AllowOverride None
Order allow,deny
Allow from all
Options ExecCGI
</Directory>
RewriteEngine On
RewriteCond %{ENV:SSL_PROXY} off
RewriteRule ^/add$ https://xn--yet.cc/add [R=301,L]
RewriteCond %{ENV:SSL_PROXY} off
RewriteRule ^/$ https://xn--yet.cc/ [R=301,L]
RewriteCond %{ENV:SSL_PROXY} on
RewriteRule ^/add$ /usr/local/shorten/cgi/shorten.pl/add [H=cgi-script,L]
RewriteCond %{ENV:SSL_PROXY} on
RewriteRule ^/$ /usr/local/shorten/htdocs/form.html [L]
RewriteRule ^/add /usr/local/shorten/htdocs/not_there [L]
RewriteRule ^/(.*)$ /usr/local/shorten/cgi/shorten.pl/$1 [H=cgi-script,B,L]
<IfModule peruser.c>
# this must match a Processor
ServerEnvironment apache apache
# these are optional - defaults to the values specified in httpd.conf
MinSpareProcessors 4
MaxProcessors 20
</IfModule>
</VirtualHost>