Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-09-20 15:18:23

jcd
Member
Registered: 2010-04-15
Posts: 12

Instant redirect from root to section

Hello everyone,

I want to redirect visitors who visit my domain root instantly to a specific section (i.e. from http://www.example.com to http://www.example.com/section). I tried adding a redirect in the .htaccess file, but I was obviously doing something wrong as this caused a loop. Maybe this can be done in Textpattern directly? Can anybody please help?

jcd

Offline

#2 2010-09-20 15:31:10

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Instant redirect from root to section

jcd wrote:

I was obviously doing something wrong as this caused a loop. Maybe this can be done in Textpattern directly? Can anybody please help?

Just so. The .htaccess directives send any request that is not to an actual resource back to the root. /index.php is Textpattern, so you can’t bypass it.


Code is topiary

Offline

#3 2010-09-20 15:32:34

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: Instant redirect from root to section

The .htaccess directives send any request that is not to an actual resource back to the root. /index.php is Textpattern, so you can’t bypass it.

Eh, silly me. Jeff’s right. i’ve deleted my post.

Last edited by JanDW (2010-09-20 15:33:12)


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#4 2010-09-20 16:27:44

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

Re: Instant redirect from root to section

Install TXP in sub-directory /section.
Do a classic redirect from root.

Using if_section="" you can set up a PHP redirect from the default home page to a section but I see errors with eg TXP search result pages (aka all pages who output under ‘home’).


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

Offline

#5 2010-09-20 17:00:07

jcd
Member
Registered: 2010-04-15
Posts: 12

Re: Instant redirect from root to section

OK I’ll try that. Thanks everyone :)

Offline

#6 2010-09-20 18:41:04

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: Instant redirect from root to section

RedirectMatch ^(.*)/$ http://domain.tld/section [L]

Only problem: you can’t access to http://domain.tld/.

Offline

Board footer

Powered by FluxBB