Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
ISAPI Rewrite rules for Textpattern on IIS
Hi all,
I’ve been using Windows hosting for quite some time now. Although Textpattern really loves Apache and is natively more suited for this type of server, I’ve got clean URL’s working.
I’m setting up a new site with the latest TXP release (4.2.0) and suddenly the Clean URLs don’t seem to work anymore. I Googled the boards here in the past and found this ISAPI rewrite rule:
[ISAPI_Rewrite]
RewriteRule /section/(\d+)/(.*) /index.php\?id=$1 [I,O,U,L]
RewriteRule /section(/*)$ /index.php\?s=section
RewriteRule /section/\?c=(.*) /index.php\?s=section\&c=$1
Which did the trick in the past on a number of sites (pre 4.2.0). Now it’s not working completely. That’s what I think is weird. The “Sections” get rewritten properly, but clean URLs in the form of “/section/id/title” return a 404. But they worked in the past with the same rewrite rule.
Anybody who experienced the same problem and came up with a solution? Has there been changed something in how TXP handles the clean URLs?
Thanks,
Piru
Last edited by Piru (2010-01-22 09:18:04)
Offline
Re: ISAPI Rewrite rules for Textpattern on IIS
Sorry for bumping this, but I still haven’t found any answer, maybe one of the more tech savy boardmembers could toss an eye on this question?
E D I T
Never mind, found it by fiddling!
Don’t exactly know why it worked in the past and didn’t work now, but by trimming in te first line, cutting away the [I,O,U,L] part it works!
[ISAPI_Rewrite]
RewriteRule /section/(\d+)/(.*) /index.php\?id=$1
RewriteRule /section(/*)$ /index.php\?s=section
RewriteRule /section/\?c=(.*) /index.php\?s=section\&c=$1
For Google:
ISAPI Rewrite Rules for Textpattern 4.2.*
Microsoft-IIS/6.0 PHP 5
Sohosted.com
Last edited by Piru (2010-03-25 13:05:16)
Offline
#3 2010-04-06 02:58:05
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: ISAPI Rewrite rules for Textpattern on IIS
Hi Piru,
I am having problems with the htaccess on a windows server, I cant get clean URLs to work, could you post your complete Htaccess contents here?
Offline
Re: ISAPI Rewrite rules for Textpattern on IIS
Rewriting URL’s on Windows Servers isn’t done with .htaccess — you’ll have to ask your hosting provider to enable a Rewrite plugin on your domain — in my case the ISAPI_Rewrite module.
Offline
#5 2010-04-06 07:59:15
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: ISAPI Rewrite rules for Textpattern on IIS
Thanks Piru,
I have no idea if ISAPI_Rewrite module is enabled already, I will ask my host about it.
Wile I wait for their answer, if that module is enabled all I need to do is use htaccess the normal way? or is it a different file?
Offline
Re: ISAPI Rewrite rules for Textpattern on IIS
It’s a different file: named isapi.ini in a different directory then your wwwroot (my host just puts a folder “ISAPI” in the top dir of my hosting account; in which the isapi files are located. You don’t need .htaccess at all.
Offline
#7 2010-04-13 08:19:14
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: ISAPI Rewrite rules for Textpattern on IIS
Hi again Piru,
the hosting is not really relaible, they take 5 to 6 days to reply to my emails or phonecalls… so…
The say they installed the Rewrite module, but I cant find an ISAPI folder or any other new folder in the server…
The isapi.ini has to be in a specific folder? is it just that code you pasted up here in the forum? or something else?
Offline
Re: ISAPI Rewrite rules for Textpattern on IIS
If I log in to my FTP account, I see the following 5 directories:
>wwwroot (in which the actual site is located)
>secure
>REWRITE
>logs
>db
If your hosting uses the same Rewrite module, you’ll find two files in the folder REWRITE: IsapiRewrite4.ini and IsapiRewrite4.dll; you have to put the code I posted in the “.ini” file
Last edited by Piru (2010-04-13 08:33:27)
Offline
#9 2010-04-16 07:51:41
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: ISAPI Rewrite rules for Textpattern on IIS
Hi,
I finaly got an answer from the hosting and they told me they installed “IIS URL Rewrite 2.0”
Does someone know how to make textpattern clean URLs work with that?
thanks!!!
Offline
#10 2011-03-04 02:20:54
- joe
- New Member
- Registered: 2011-03-04
- Posts: 1
Re: ISAPI Rewrite rules for Textpattern on IIS
Hello,
I am trying to install on IIS 6 using ISAPI Rewrite 3 pro but it isn’t working. I am getting the front page but every link just reloads the front page. I am using /section/title permanant link mode.
Can anyone offer any help?
Offline
Re: ISAPI Rewrite rules for Textpattern on IIS
another article of the same topic ist over here
Offline