Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

301 Redirect CGI URL

by wetsand (Initiate)
on Apr 30, 2015 at 02:30 UTC ( [id://1125199]=perlquestion: print w/replies, xml ) Need Help??

wetsand has asked for the wisdom of the Perl Monks concerning the following question:

Sorry I'm a newbie when it comes to pearl. Trying to 301 old legacy files like oldsite.com/green/red.cgi/blue/ using this htaccess code: Redirect 301 /green/red.cgi/blue/ http://www.newsite.com/summary-page/ Instead it's redirecting to: newsite.com/red.cgi/blue/ FYI oldsite.com's htaccess file does not have any global 301 rules that would conflict How can I redirect these CGI files properly? Thanks.

Replies are listed 'Best First'.
Re: 301 Redirect CGI URL
by Anonymous Monk on Apr 30, 2015 at 02:54 UTC

    Edit the programs

    #!/usr/bin/perl -- use CGI(); print CGI->redirect( 'http://anythingyouwant' ); exit;

    Then go study apache manual until you figure out .htaccess

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1125199]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-24 18:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found