Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-01-15 18:43:55

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

Re: IIS, ISAPI_rewrite and clean urls

YAY!!!!

SENCER! – the new publish.php now works when jduecks isapi-rewrite rules are used, these three lines repeated for each section.

[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

but ONLY for /section/id/title. I was hoping for /section/title but this is just great.

So, now, for the very first time I have clean-enough urls on IIS with isapi_rewrite! Excellent! Thanks so much!!!

Offline

#14 2006-10-15 19:32:05

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

Re: IIS, ISAPI_rewrite and clean urls

has anyone come up with the re-write code for /id/title?

Offline

#15 2011-02-01 23:22:24

dhatman
New Member
Registered: 2011-02-01
Posts: 2

Re: IIS, ISAPI_rewrite and clean urls

I got it to work with http://www.iis.net/download/URLRewrite using http://learn.iis.net/page.aspx/470/importing-apache-modrewrite-rules/.

My web.config files ended up like this:

<?xml version=“1.0” encoding=“UTF-8”?>
<configuration> <system.webServer> <!— Don’t show directory listings for URLs which map to a directory. —> <directoryBrowse enabled=“false” /> <rewrite> <rules> <!— Rewrite URLs of the form ‘x’ to the form ‘index.php?=x’. —>

<rule name=“Imported Rule 1” stopProcessing=“true”> <match url=”^(.+)” ignoreCase=“false” /> <conditions logicalGrouping=“MatchAny”> <add input=”{REQUEST_FILENAME}” matchType=“IsFile” ignoreCase=“false” /> <add input=”{REQUEST_FILENAME}” matchType=“IsDirectory” ignoreCase=“false” /> </conditions> <action type=“None” /> </rule> <rule name=“Imported Rule 2”> <match url=”^(.*)” ignoreCase=“false” /> <conditions logicalGrouping=“MatchAll”> <add input=”{URL}” pattern=”^/favicon.ico$” ignoreCase=“false” negate=“true” /> </conditions> <action type=“Rewrite” url=“index.php” /> </rule> </rules> </rewrite> <httpErrors> <remove statusCode=“404” subStatusCode=”-1” /> <error statusCode=“404” prefixLanguageFilePath=”“ path=”/index.php” responseMode=“ExecuteURL” /> </httpErrors> <defaultDocument> <!— Set the default document —> <files> <remove value=“index.php” /> <add value=“index.php” /> </files> </defaultDocument> </system.webServer> </configuration>

Hope this helps..

Offline

Board footer

Powered by FluxBB