Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-01-18 20:38:42

fhd
Member
Registered: 2009-11-01
Posts: 13

Redirect from front page to section

Hi,

my website used to be a pure blog, but I’m planning to add a bit more content. Hence I’ve got more than one section, and front page and “blog” section are no longer supposed to be exactly the same.

In fact, I do not want to use a front page at all – I want http://example.com to redirect to http://example.com/blog. http://example.com/foo, however, should not redirect to the blog.

I’ve tried it with aks_header, uncuccessfully:

<txp:aks_301 start="/" url="/blog"/>

This does redirect the front page to the blog, but it also redirects every other page to it, which I do not want.

How can I achieve what I want?

Edit:
Here’s some more details:
I’m using a .htaccess redirect right now, like this:

RedirectMatch ^/$ http://example.com/blog [L]

But I’m still wondering if Textpattern can do this on its own.

Last edited by fhd (2011-01-18 20:53:14)

Offline

#2 2011-01-19 05:18:25

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Redirect from front page to section

Hi.
Have you tried this?

<txp:if_section name="default"><txp:aks_301 start="/" url="/blog"/></txp:if_section>

La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2011-01-21 10:11:44

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: Redirect from front page to section

Also check out the short thread redirect 301…

Last edited by merz1 (2011-01-21 10:12:52)


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

Board footer

Powered by FluxBB