Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-14 18:45:19

steventer
Member
Registered: 2004-12-03
Posts: 56

IIS, ISAPI_rewrite and clean urls

I’ve been googling this forum and the net for over two hours now, and the closest I came to an answer was this forum entry:

http://forum.textpattern.com//viewtopic.php?id=3401

which is 1.5 years old, so obviously much has changed since then, because I did as jdueck suggested and placed a httpd.ini file in wwwrooot with the following three lines for each section on my site, with xxx being the name of the section:

RewriteRule /xxx/(\d+)/(.*) /index.php\?id=$1 [I,O,U,L]
RewriteRule /xxx(/*)$ /index.php\?s=xxx
RewriteRule /xxx/\?c=(.*) /index.php\?s=xxx\&c=$1

When switching the permalink mode to /section/title I get the following error:

The system cannot find the file specified.

Can anyone shed some light on this for me, please? I had a look at the documentation for isapi_rewrite at
http://www.isapirewrite.com/docs/#RegexSynt
but I am no programmer, and that page really made my head hurt. :(

Any tips or advice greatly appreciated.

Offline

#2 2006-01-14 21:02:23

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

Re: IIS, ISAPI_rewrite and clean urls

I can’t help you with rewrites, but maybe you can consider using this metho of clean-urls:
http://textpattern.com/weblog/135/partly-messy-clean-urls-without-modrewrite-experimental

It doesn’t use rewrites, instead it works as a 404 error-handler, i am sure there is a way to set that in IIS as well. Just an idea…

Offline

#3 2006-01-14 22:41:21

steventer
Member
Registered: 2004-12-03
Posts: 56

Re: IIS, ISAPI_rewrite and clean urls

Thanks, Sencer. I tried it: changed my config.php, changed the custom 404 in IIS to /textpattern/index.php and change permlink mode to /section/title but what happens is that I get shown the textpattern login page…

I’ll have to hope that I find an IIS or isapi_rewrite guru somewhere while googling. :(

Offline

#4 2006-01-14 22:44:44

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

Re: IIS, ISAPI_rewrite and clean urls

changed the custom 404 IIS to /textpattern/index.php

That’s the reason why it didn’t work. Try setting it to “/index.php” instead.

Offline

#5 2006-01-15 00:47:31

steventer
Member
Registered: 2004-12-03
Posts: 56

Re: IIS, ISAPI_rewrite and clean urls

Nope: /index.php doesn’t work with any of the permlink options. Thanks for trying, Sencer: looks like I’m going to have to live with messy urls :( which I really don’t like.

Offline

#6 2006-01-15 01:16:07

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

Re: IIS, ISAPI_rewrite and clean urls

a IIS working group sounds like a plan…

Offline

#7 2006-01-15 12:26:30

steventer
Member
Registered: 2004-12-03
Posts: 56

Re: IIS, ISAPI_rewrite and clean urls

I think so: zem has said a few times on this forum that IIS users are either unwilling or unable to help: well, I’m definitely unable to help… I’m not comfortable with coding, and while I’d be willing to try any suggestions anyone comes up with, I am a complete IIS/isapi_rewrite newbie.

It might just be easier to change over to a linux/apache host…

Offline

#8 2006-01-15 12:56:56

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

Re: IIS, ISAPI_rewrite and clean urls

yep I got no experience with IIS or any other type of server beyond XAMPP – but thinking of getting a box together to try learn / troubleshoot

Offline

#9 2006-01-15 13:08:00

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

Re: IIS, ISAPI_rewrite and clean urls

Nope: /index.php doesn’t work with any of the permlink options.

Can you be any more specific? Do you get error-messages? Do you see textpattern’s error-page, or do you see IIS 404 pages? Basically anything more than “doesn’t work” might help us in finding a solution. :)

Offline

#10 2006-01-15 13:42:58

steventer
Member
Registered: 2004-12-03
Posts: 56

Re: IIS, ISAPI_rewrite and clean urls

Hi Sencer: to be honest, I didn’t expect you to keep trying to troubleshoot this for me: we IIS users are obviously a very small minority here :( , so I appreciate your time.

OK, I’ve just changed back to /section/title permalink, with the updated config.php and 404 being redirected to /index.php, and what happens is that I get redirected to index.php, the front page of the site, no error messages.

Obviously the url data is not being passed…

Edit: I just wanted to add that I can (just, barely) live with messy urls, but at least one plugin (ran_tags) doesn’t work with messy urls:

http://domain/tag?t=activism DOESN’T work, but http://domain/index.php?s=tag&t=activism DOES, so I/m hoping that by changing something in these lines (of the plugin) the plugin can be made to add the index.php?s=tag bit to the url?

$tags_html = ‘’; $url = ‘http://’ . $siteurl . $path_from_root . ‘tag’; //$url .= ($url_mode==1) ? ‘/’ : ‘?t=’; $url .= ‘?t=’;

Edit2: Gawd I’m becoming a 133t h4x0r! :)
It does work if you change those plugin lines to:

$tags_html = ‘’; $url = ‘http://’ . $siteurl . $path_from_root; //$url .= ($url_mode==1) ? ‘/’ : ‘?t=’; $url .= ‘index.php?s=tag&t=’;

CAVEAT: I’m not programmer, have no idea how I worked out how to do that and this might very well break your site completely. Or not.

Last edited by steventer (2006-01-15 14:15:49)

Offline

Board footer

Powered by FluxBB