Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2005-09-28 03:15:37

jdueck
Plugin Author
From: Minneapolis, MN
Registered: 2004-02-27
Posts: 147
Website

Re: OK let's get this working on IIS

clean urls are working using ISAPI rewrite, but only section/id/title … If I get time next week I will try and make rules for the other url formats.

Offline

#14 2005-10-04 21:19:58

aesop1
Archived Plugin Author
Registered: 2004-09-19
Posts: 142

Re: OK let's get this working on IIS

It would be cool if you could post the regexp (I think ISAPI Rewrite requires those, right?) and what you had to do to get ISAPI Rewrite playing nice with both TXP and IIS. Maybe a step-by-step?

I wrestled with TXP/IIS months ago and just bagged it for a Linux box/Apache.

Offline

#15 2005-10-04 21:51:26

jdueck
Plugin Author
From: Minneapolis, MN
Registered: 2004-02-27
Posts: 147
Website

Re: OK let's get this working on IIS

I certainly don’t recommend IIS. If you were able to use an Apache/*nix type setup, I’d say stick with it.

I didn’t have to handle the installation of ISAPI Rewrite, I got the admins at the hosting company to do that. After it is installed, put a text file called <code>httpd.ini</code> in the public root dir of your web site.

ISAPI Rewrite’s regexp syntax is slightly different than mod_rewrite’s syntax. Here’s what my <code>httpd.ini</code> looks like (sort of):

<pre><code>[ISAPI_Rewrite]

RewriteRule /news/(CompanyNews|Articles|Events)$ /index.php\?s=news&c=$1 [I,O,U,L]
RewriteRule /(?:news|about|services|contact|case|client)/(\d+)/(.*) /index.php\?id=$1 [I,O,U,L]
RewriteRule /(news|about|services|contact|case|client)(/*)$ /index.php\?s=$1 [I,O,U]
</code></pre>

There is probably a better way to do it, but this is what I have found that works. The only thing is A) this only works for the “section/id/title” url scheme and B) you have to edit your <code>httpd.ini</code> every time you add a new section, although you probably don’t need to do that very often.

Last edited by jdueck (2005-10-04 21:52:58)

Offline

#16 2005-10-05 22:03:39

aesop1
Archived Plugin Author
Registered: 2004-09-19
Posts: 142

Re: OK let's get this working on IIS

Very cool. Thanks. I don’t need it for myself, but other poor souls have asked me about this. Nice to know there is an IIS alternative if nothing else is available for TXP.

Offline

#17 2006-03-09 19:33:06

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: OK let's get this working on IIS

I discovered another rule is needed for file downloads. Here’s what I came up with:

# Rule for file downloads
RewriteRule /file_download/(\d+) /index.php\?s=file_download&id=$1 [I,O,U,L]

Offline

Board footer

Powered by FluxBB