Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Why does this happen in build_detail_format

Quote Reply
Why does this happen in build_detail_format
In Setup > Build Options > build_detail_format the default is set to LinkID.

My site uses rewrite rules to display static pages as dynamic. The setting above displays links as /Detailed/1234.php

If I change it to something like Title_LinkID i get /Detailed/Title_1234.php but /Detailed/1234.php still works. Infact, you can put anything you like in the URL, as long as it ends in the link number, and it still displays the page: /Detailed/typewhateveryoulike_1234.php

My question is, is there any way that you can force it to only use the preferred build_detail_format? As I changed it to a custom format Google now shows that all my links are duplicated.
Quote Reply
Re: [MJB] Why does this happen in build_detail_format In reply to
The problem is with the way it gets the ID number from the URL. The examples you gave would both be passed to page.cgi as:

page.cgi?g=/Detailed/1234.php
page.cgi?g=/Detailed/typewhateveryoulike_1234.php

..and GLinks does (AFAIK) something like:

(\d+)\.php$

(or whatever your extension is).. and then uses $1 to grab the LinkID

...so basically, you could use:

sdfsdfs_sdfsdfsdf_sdfsdfsf_sdfsdf/1234.php

..and that would still end up on 1234.php's page

I actually did some work for someone else on this a month or so ago, where it actually checks to see if the URL is correctly formatted for the given link (and does a 301 redirect if its not correct)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Why does this happen in build_detail_format In reply to
So would build static be the best way to go?
Quote Reply
Re: [MJB] Why does this happen in build_detail_format In reply to
In terms of being able to have more control of how the pages are built (i.e if a page doesn't exist, it simply give s a 404 error) ... but if you just wanna "catch" the detailed pages, then I would try the "hack" I came up with on that other job., and see if that works for you :) (it requires a change in Links//User/Page.pm though, so you would have to be sure to update it in the future if you did any updates)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Why does this happen in build_detail_format In reply to
Andy wrote:
try the "hack" I came up with on that other job., and see if that works for you :)

OK, I'll give it a try. Where can I find it?
Quote Reply
Re: [MJB] Why does this happen in build_detail_format In reply to
I would have to do it as a custom job, as it would most likely need customizing for your site Wink

Probably 30 mins work (email me if your interested)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates