Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Redirect Code for Ask Frames Plugin

Quote Reply
Redirect Code for Ask Frames Plugin
Hello there,

I am using the Ask Frames plugin and basically wanted to make the jump2.cgi link static looking so instead of http://www.domain.com/cgi-bin/jump2.cgi?ID=1 i could get something like http://www.domain.com/cgi-bin/TITLE_OF_LINK/

I have been browsing the forums for a couple of hours and found many posting with redirect code to place in the .htacces file. I tried everything and nothing finally worked.

I have been trying to observe the language used but it is way too much for a cut and paste developer like me :) I really wish i would know more.

Any help is greatly appreciated.

Thanks,

David
Quote Reply
Re: [daser007] Redirect Code for Ask Frames Plugin In reply to
Try this;

new global, called <%make_jumpo_link($Title,$ID)%>

Code;

Code:
sub {
my $title = $_[0];
my $id = $_[1];
$title =~ s|[/-\.]|_|sig;
return $CFG->{build_root_url} . "_JUMP$id.html";
}

Then in your WWW folder (i.e where index.html is), add this to your .htaccess file (make this file, if it doesn't exist =));

RewriteEngine on

Code:
RewriteRule JUMP([0-9+])\.html$ /cgi-bin/jump2.cgi?ID=$2 [L]

Untested, but should work =)

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Redirect Code for Ask Frames Plugin In reply to
Hello Andy,

Thanks a lot for your help. I created the .htaccess file with that code and made a new global. I tried different names:

<%make_jumpo_link($Title,$ID)%>
make_jumpo_link($Title,$ID)
make_jumpo_link

I wasn't sure where to call the global from. I figured the link.html template.

The problem is when I create the global and call it and try to "rebuild all" the rebuild freezes at the "building home" stage but doesn't give any errors.

Thanks in advance for your help.

David
Quote Reply
Re: [daser007] Redirect Code for Ask Frames Plugin In reply to
Hi,

Mmm.. are you sure its freezing, and not just taking a while to run? :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!