Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-02-23 16:41:02

chrismc
Plugin Author
Registered: 2004-09-13
Posts: 37
Website

Re: IIS and non-messy URLs via 404 error pages.

Sencer,

Thanks – I missed that. Still not quite there though – I can get a comment preview, but submitting the comment dumps me to the site root. On the preview page I get the following errors:

<code>
tag_error <txp:comments_form/> -> Notice: Undefined index: nonce on line 243

tag_error <txp:comments_form/> -> Notice: Undefined index: secret on line 244
</code>

Offline

#14 2006-02-24 05:41:26

sominty
Member
Registered: 2005-12-27
Posts: 16

Re: IIS and non-messy URLs via 404 error pages.

This is very interesting. If you guys do ever find a “final” solution, you should write up a tutorial (or even a plugin). I am sure all the people who host TXP on IIS will apprecite it :)

Offline

#15 2006-02-24 08:08:22

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

Re: IIS and non-messy URLs via 404 error pages.

chrismc, does it work with messy-urls or do you have the same error?

Have you modified the code in any way, or are you using any comment related plugins (like removing previews or anything like that).

Can you give us a link to the site in question?

Offline

#16 2006-02-24 10:00:57

chrismc
Plugin Author
Registered: 2004-09-13
Posts: 37
Website

Re: IIS and non-messy URLs via 404 error pages.

Messy URLs work fine Messy URLs appear to not work either, but with no error messages. Apart from the changes in this thread, it’s a “stock” 4.0.3 install with no modifiacations or plugins.

I’m afraid I can’t link to the site ATM – it’s an internal testing server. I’ll see if I can get authorisation to open it up to outside help…

Last edited by chrismc (2006-02-24 10:02:43)

Offline

#17 2006-04-12 01:23:16

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: IIS and non-messy URLs via 404 error pages.

Ian, your solution works well – but I’m finding difficulties with categories… i.e. urls in the form /fishing/?c=deep-sea

I think the category bit of the url is ignored, landing you on the section home page

Offline

#18 2006-04-12 07:57:38

ianseckington
New Member
Registered: 2005-03-13
Posts: 9

Re: IIS and non-messy URLs via 404 error pages.

nardo wrote:

Ian, your solution works well – but I’m finding difficulties with categories… i.e. urls in the form /fishing/?c=deep-sea

I think the category bit of the url is ignored, landing you on the section home page

nardo,

Interesting… On my localhost, I have the default installation template (with the category selection via a drop-down list). This sends a request to the server in the format you have (/?c=xxxx). On my second machine, I’m using a template that redirects category requests to something like /fishing/category/deep-sea (it’s txp manji 2, fwiw). Both of which do actually work on both installations.

If you try to enter your failing request using the above (/category/xxx) format, does it still redirect you to the section homepage?

If no-one else has seen anything like this happening on standard installations, I’m happy to try and replicate your problem on my machine here — what versions of IIS and the OS do you have? Would you be happy to zip up your txp installation and email it to me (I don’t need the database files, so it’s just the code bits)?

Offline

#19 2006-04-13 00:55:14

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: IIS and non-messy URLs via 404 error pages.

neither URL format works for me … I hadn’t tried the clean fishing/category/deep-sea format … that actually returns a 404

fairly certain there’s no template/tag issues … as messy URLs (/index.php?s=fishing&c=deep-sea) generate the page I’m after … maybe of note is that when viewing the admin / logs page, this messy url does not go through the 404 handling process (maybe that’s obvious!)

server info: Microsoft-IIS / 5.0 NT … (dunno much about servers, does that sound right?)

many thanks Ian

Offline

#20 2006-04-13 08:03:10

ianseckington
New Member
Registered: 2005-03-13
Posts: 9

Re: IIS and non-messy URLs via 404 error pages.

maybe of note is that when viewing the admin / logs page, this messy url does not go through the 404 handling process

Yes, this is fine — calling index.php with parameters won’t cause a 404 as the page (index.php) is physically present on the server.

What we’re trying to do in the clean URL scheme is to persuade IIS to send any ‘not found’ requests (such as /category/fishing) to index.php where the code can break the URL down and return the requested article (assuming it exists in the TXP database).

neither URL format works for me … I hadn’t tried the clean fishing/category/deep-sea format … that actually returns a 404

Just to confirm, do you have a custom 404 error handling document set up in IIS for this website? For this method to work on IIS, you need both a custom 404 error handler (set to point to the URL of index.php) and the ‘modified’ publish.php from above (just look for the kludged code; it’ll be mine ;-)

If you do have the above two set up and are still getting problems, then you can always send me a zip/rar of your website’s TXP install so I can attempt to install it here (my email: ian.seckington AT gmail.com).

Offline

Board footer

Powered by FluxBB