Textpattern Forum

You are not logged in. Register | Login | Help

#11 2004-07-06 13:59:00

ThrokFeroth
Member
From: Malaysia
Registered: 2004-02-28
Posts: 12
Website

Re: [plugin] [ORPHAN] zem_redirect

Firstly, I use my default template for my Thoughts section. However if I add the redirect, the thing will redirect me to http://relativemind.net/default which is not a section at all, but merely the page template name.

Next, if I create a template called Thoughts and add the redirect, the thing exceeds redirection limits everytime I try to access the individual article.

Well, I do have a redirect that redirects all who access http://www.relativemind.net to http://relativemind.net. Is this the thing which causes it not to work?

Offline

#12 2004-07-06 17:01:10

kennethlove666
Member
From: arkansas
Registered: 2004-04-27
Posts: 107
Website

Re: [plugin] [ORPHAN] zem_redirect

i had the same problem with it constantly appending /default/ to the URL. but i’m not really worried about catching 404s anyway, so i won’t worry about it right now.


Listen to Kenneth

Offline

#13 2004-07-06 23:49:00

zem
Developer emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579
Website

Re: [plugin] [ORPHAN] zem_redirect

Throk, the plugin will redirect if the domain name doesn’t match the one set in your Textpattern configuration.

If the Textpattern domain is configured as http://www.relativemind.net, and you have a redirect set up to http://relativemind.net, the plugin will redirect back to www.relativemind.net. That could be why you’re seeing a circular redirect. Changing the web domain in the textpattern config to http://relativemind.net should fix that. Let me know if it doesn’t.

I’ll look into the /default/ problem.

Last edited by zem (2004-07-07 00:04:57)


Alex
tstate

Offline

#14 2004-07-07 00:03:52

zem
Developer emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579
Website

Re: [plugin] [ORPHAN] zem_redirect

There’s a new version up:

http://vigilant.tv/documents/tp/zem_redirect-0.4.txt

I think it fixes the “default” issue – can someone confirm?

It also adds a “test” attribute, to help debug circular redirects:

<txp:zem_redirect test=1 />

When set, the plugin won’t force a redirect; instead it will output a HTML comment showing the actual URL used to access the page, and the URL it would redirect to.


Alex
tstate

Offline

#15 2004-07-07 19:19:17

misterk
Member
From: Morris, MN
Registered: 2004-02-24
Posts: 76
Website

Re: [plugin] [ORPHAN] zem_redirect

One thing that would be neat and fits into the scope of your redirect plugin would be to check whether the /section corresponded correctly to the entry id.

If I enter station11.net/read/[random number within the limit of my posted articles], the article will show up regardless of whether it is really in the read section. Not a big deal, but if zem_redirect could check and fix that as well as the title it would be cool.

Offline

#16 2004-07-08 10:16:59

Sencer
Developer emeritus
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: [plugin] [ORPHAN] zem_redirect

I am still getting circular redirects, however this may be due to my blog having imported entries from b2. I guess this won’t happen if you only have entries made with textpattern.

An example can be seen here:

http://www.sencer.de/article/50/openbook----freie-b%EF%BF%BDcher

There are some “funny characters” in the url, anyway I have test-mode activated and I always get this:

<code>requested URL: http://www.sencer.de/article/50/openbook----freie-b%EF%BF%BDcher redirect to: http://www.sencer.de/article/50/openbook----freie-b�cher</code>

Last edited by Sencer (2004-07-08 10:19:12)

Offline

#17 2004-07-09 04:18:50

zem
Developer emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579
Website

Re: [plugin] [ORPHAN] zem_redirect

Thanks for the report, Sencer – it’s a bug in the plugin’s handling of non-ascii characters. Nothing to do with b2. I’ll fix this and the other outstanding issues soon.


Alex
tstate

Offline

#18 2004-07-09 06:18:04

ThrokFeroth
Member
From: Malaysia
Registered: 2004-02-28
Posts: 12
Website

Re: [plugin] [ORPHAN] zem_redirect

Funny thing really. When I put in the test attribute this is what comes out:

requested URL: http://www.relativemind.net/
redirect to: http://relativemind.net/

when I requested for http://relativemind.net.

Offline

#19 2004-07-09 07:08:25

zem
Developer emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579
Website

Re: [plugin] [ORPHAN] zem_redirect

Hmm, strange.

The domain name in the “requested URL:” output comes from the SERVER_NAME variable. That’s supposed to be the current vhost name, but it’s not necessarily clear whether that’s always the case – for example after a 302 redirect, which is what you’re using in addition to the plugin.

I’ll add an option to the next version to ignore the domain name portion of the URL. Hopefully that’ll solve the problem for you.


Alex
tstate

Offline

#20 2004-07-10 02:38:49

zem
Developer emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579
Website

Re: [plugin] [ORPHAN] zem_redirect

There’s a new version up:

http://vigilant.tv/documents/tp/zem_redirect-0.5.txt

Changes:

  • Adds a new attribute “ignoredomain”, to help eliminate circular redirects on www/no www domains
  • Adds a new attribute “errorid”, which specifies an article ID to display as a 404 message
  • Now checks that the URL section matches the article section, and redirects if necessary – useful if you’ve moved an article from one section to another
  • Should fix the non-ASCII URL bug (untested)


Alex
tstate

Offline

Board footer

Powered by FluxBB