Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-19 14:27:31

kickino
New Member
Registered: 2008-02-19
Posts: 4

zem_redirect with "/$id/$title/" scheme - broken category links

I would like to use the “/$id/$title/” scheme with zem_redirect. But it doesn’t work. I figured out, that zem_redirect only support the scheme “/$section/$id/$title/” so I changed the following lines for me:

$canonical_uri = $path_from_root.$rs[“section”].”/”.$pretext[“id”].”/”.stripSpace($title);
to $canonical_uri = $path_from_root.$pretext[“id”].”/”.stripSpace($title);

$canonical_uri = ($section ? $path_from_root.$section.”/” : $path_from_root);
to $canonical_uri = $path_from_root;

This works perfect. But I’ve got a problem with:
“/category/$category/” beeing redirected to “/” which is really annoying. Since textpattern uses also /?c= – I used RewriteRule ^category/(.*)/ /\?c=$1 [L,R=301]
on my own. This works, but it is not nice.

Is there a chance to get “/category/$category/$1” beeing redirected to “/category/$category/” and “/category/$category/” to be as it is? ;-)

Also nicer if I can get “/?c=$1” also redirected to “/category/$1/” :-)

Thanks a lot for your help. Regards, kickino

Offline

#2 2008-02-19 15:29:06

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: zem_redirect with "/$id/$title/" scheme - broken category links

I would like to use the “/$id/$title/” scheme with zem_redirect. But it doesn’t work. I figured out, that zem_redirect only support the scheme “/$section/$id/$title/”

it works just fine for me here

Last edited by colak (2008-02-19 15:29:40)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2008-02-19 16:26:52

kickino
New Member
Registered: 2008-02-19
Posts: 4

Re: zem_redirect with "/$id/$title/" scheme - broken category links

http://neme.org/main/750/censored
^ what didn’t you understand “/$id/$title/” NOT $section. ;-) You’ve got $section=main ;)
That’s what I don’t want. :/

Any other comments? :/

Last edited by kickino (2008-02-19 16:29:27)

Offline

Board footer

Powered by FluxBB