#!/usr/bin/perl use strict; use warnings; my $url = (split '?', $ENV{QUERY_STRING})[0]; my $path = $url; $path =~ s|http://domain.name|/home/username/public_html|s; -e $path or $url = 'http://domain.name/default_frame.htm'; print <<_END_; Content-type: text/html _END_ exit(0);