Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 studying the Monastery: (6)
As of 2024-03-29 01:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found