#!/usr/bin/perl ## underscores-to-hyphens.pl ## tom sherman use CGI; my $q = CGI->new(); $url = "http://" . $ENV{'HTTP_HOST'} . $ENV{'REQUEST_URI'}; ## my site-specific URL changes done via regex: ## (1) underscores to hyphens ## (2) get rid of "/content" ## you probably want to change or remove these lines... $url =~ s/_/-/g; $url =~ s/\/content//; print $q->redirect( -location => $url, -status => '301 Moved Permanently', -type => 'text/html' ); print "\n"; print "\n"; print "301 Moved Permanently\n"; print "\n"; print "\n"; print "

Moved Permanently

\n"; print "The document has moved here.

\n"; print "\n"; print "\n";