Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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