Gossamer Forum
Home : Products : Gossamer Links : Discussions :

how do I transfer submission links from from 2.0 to SQL

Quote Reply
how do I transfer submission links from from 2.0 to SQL
I've just bought and installed Links SQL. I installed to a new directory and the install went fine. However all my html pages and links to my site out on the web are linked to the add.cgi in my old Links 2.0 directory. Has anyone come up with a way to redirect submitters who use the old links 2.0 add.cgi URL to the Links SQL add.cgi?

BTW I tried searching for this but could come up with a query that didn't net me more that 250 hits. I went through about 50 before I gave up.

Thanks

CCUnet
my Christian web
Quote Reply
Re: [ccunet] how do I transfer submission links from from 2.0 to SQL In reply to
Replace your old add.cgi with something like this:

Code:


#! /usr/local/bin/perl #change this to your path to perl

use CGI;

print "Location:http://www.yourdomain.com/cgi-bin/add.cgi\n\n"; #change the url
1;
The UK High Street
Quote Reply
Re: [afinlr] how do I transfer submission links from from 2.0 to SQL In reply to
Thanks that worked for everything except the rate.cgi. But I can live with that.



CCUnet
my Christian web
Quote Reply
Re: [afinlr] how do I transfer submission links from from 2.0 to SQL In reply to
You don't need use CGI; if you are just printing a standard redirect.
Quote Reply
Re: [ccunet] how do I transfer submission links from from 2.0 to SQL In reply to
If the reason that the rate.cgi wont work is because you need to pass the ID of the link through to the new url, you can use this:

#! /usr/local/bin/perl #your path to perl

use CGI;
my $IN = new CGI;
my $id = $IN->param(ID);

print "Location:http://www.yourdomain.com/yourpath/rate.cgi?ID=$id\n\n";
1;

You do need the use CGI in this one (thanks for pointing that out Paul Tongue).

Laura.
The UK High Street
Quote Reply
Re: [afinlr] how do I transfer submission links from from 2.0 to SQL In reply to
You also need quotes around ID Smile

Wouldn't it just be better to replace the old Links2 cgi scripts with the new ones and just update the "use lib" and Links::init() paths?
Quote Reply
Re: [Paul] how do I transfer submission links from from 2.0 to SQL In reply to
I am using rewrite rules for this. Works fine.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [afinlr] how do I transfer submission links from from 2.0 to SQL In reply to
Thanks a heap for the help. I'm just getting started with Links SQL so I can use all I can get.



CCUnet
my Christian web
Quote Reply
Re: [Paul] how do I transfer submission links from from 2.0 to SQL In reply to
Paul,

Could you say some more about how I would do this?



CCUnet
my Christian web
Quote Reply
Re: [afinlr] how do I transfer submission links from from 2.0 to SQL In reply to
In Reply To:
If the reason that the rate.cgi wont work is because you need to pass the ID of the link through to the new url, you can use this:

#! /usr/local/bin/perl #your path to perl

use CGI;
my $IN = new CGI;
my $id = $IN->param(ID);

print "Location:http://www.yourdomain.com/yourpath/rate.cgi?ID=$id\n\n";
1;

You do need the use CGI in this one (thanks for pointing that out Paul Tongue).

Laura.


I can't seem to get this to work.

http://www.ccunetwork.com/cgi-bin/links/rate.cgi

I'm getting a 500 internal server error. Any thoughts

Thanks

CCUnet
my Christian web
Quote Reply
Re: [ccunet] how do I transfer submission links from from 2.0 to SQL In reply to
Try

my $id = $IN->param('ID');

i.e. add the quotes.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] how do I transfer submission links from from 2.0 to SQL In reply to
In Reply To:
Try

my $id = $IN->param('ID');

i.e. add the quotes.


I tried that but it didn't work. So I tried Paul's suggestion and just dumped the SQL rate.cgi file into my old directory and it works fine.



Thanks for all the help.

CCUnet
my Christian web