Code from Isapi doesn't work with Helicon Ape

Helicon Ape provides support for Apache .htacces and .htpasswd configuration files for Microsoft IIS.
User avatar
Posts: 2
Joined: 28 Jan 2016, 16:07

Code from Isapi doesn't work with Helicon Ape

28 Jan 2016, 16:26

Hello,

My host company has just upgraded from a windows 2003 server to a windows 2012 server with Helicon Ape.

My ISAPI codes in .htaccess file no longer work but I cannot see anything to change on the Helicon website, which is very confusing for an old man who doesn't understand this kind of coding.

For example: To change http://www.mysite.com/bed-and-breakfast ... y=Ayrshire into http://www.mysite.com/uk-bed-breakfast-ayrshire.htm
The old ISAPI (v 3.0.0.21) code was:
Code: Select all
RewriteEngine on
RewriteBase /
RewriteRule ^uk-bed-breakfast-(.*)\.htm /bed-and-breakfast/region.asp\?county=$1 [QSA]


This code has worked well for years and the support people at my host company don't seem to know much about their new server and cannot tell me how to fix the problem. I now have a lot of pages on my website returning a 404 error.

Can anyone tell me what I need to change in the .htaccess file to make it work on the new server with Helicon Ape?

Many Thanks in advance

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Code from Isapi doesn't work with Helicon Ape

29 Jan 2016, 10:02

Answered by email.

User avatar
Posts: 92
Joined: 01 Dec 2012, 14:22

Re: Code from Isapi doesn't work with Helicon Ape

28 Apr 2016, 13:02

Yaroslav wrote:Answered by email.


Why? I thought the idea of these boards was to help people who might have the same problem.

I'm considering updating from ISAPI_rewrite to Ape, but this sort of posting is not filling me with confidence to go ahead.

User avatar
Posts: 2
Joined: 28 Jan 2016, 16:07

Re: Code from Isapi doesn't work with Helicon Ape

28 Apr 2016, 13:16

I resolved the problem as follows. instead of a .htaccess file I now have a web.config file in the root directory.

The syntax content I use in the web.config file is:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <outboundRules>
                <preConditions>
                    <preCondition name="ResponseIsHtml1">
                        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                    </preCondition>
                </preConditions>
            </outboundRules>
            <rules>
                <rule name="Imported Rule 1">
                    <match url="^canada/province/(.*)/(.*)\.htm" ignoreCase="false" />
                    <action type="Rewrite" url="/canada/province.asp?state={R:1}&amp;status={R:2}" appendQueryString="true" />
                </rule>
    </rules>
        </rewrite>
    </system.webServer>

</configuration>


I hope this helps.

Tog

User avatar
Posts: 92
Joined: 01 Dec 2012, 14:22

Re: Code from Isapi doesn't work with Helicon Ape

12 May 2016, 16:18

So, you've basically solved the problem by using the IIS rewrite instead of ISAPI-Rewrite.

Still doesn't incline me to upgrade to Ape - which I'd like to do for a number of reasons. But if my ISAPI_Rewrite rules won't go forward more-or-less unchanged, it's too big a risk.

Return to Helicon Ape

Who is online

Users browsing this forum: No registered users and 30 guests