Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2011-06-09 18:33:20

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: Simple redirect from one article to another

Whoa, I missed some of those answers when posting, hence the edit.

Not QUITE sure how the parse command should be done. I’ve got this, which is a no-go:

Header("Location: " parse("<txp:custom_field name='redirect' />")  ");

Last edited by alesh (2011-06-09 18:38:48)


Yes, I have tried turning it off and on.

Offline

#14 2011-06-09 19:28:51

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 689
Website Mastodon

Re: Simple redirect from one article to another

Alesh, try this, please:

<txp:if_individual_article><txp:if_custom_field name="redirect">
<txp:php>
global $thisarticle;
Header("HTTP/1.1 301 Moved Permanently");
Header('Location: '.$thisarticle['redirect'].'');
</txp:php>
</txp:if_custom_field></txp:if_individual_article>

Note, that i could make the 2nd Header line only work here, when using no double quotes at all (which seems odd to me):

Hope it works now.

Last edited by jayrope (2011-07-16 14:36:52)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#15 2011-06-09 19:55:38

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: Simple redirect from one article to another

That did it. Thanks so much!!

http://artandculturecenter.org/ryan-humphrey-fast-forward


Yes, I have tried turning it off and on.

Offline

#16 2011-06-09 20:04:32

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 689
Website Mastodon

Re: Simple redirect from one article to another

Glad i could be of help. Was really just hacking code from various forum entries… Recommended procedure :) *Enjoy.


A hole turned upside down is a dome, when there’s also gravity.

Offline

Board footer

Powered by FluxBB