Remove rewrite from one site

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 7
Joined: 11 Feb 2013, 09:20

Remove rewrite from one site

16 Dec 2013, 12:48

If I do not want rewrite for one particular site, do I just remove the handler mapping? If so, which one?

Thanks,
Dan

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Remove rewrite from one site

16 Dec 2013, 16:07

Hello,

1. I think there's a more straightforward solution. If you're using httpd.conf, which affects all server and every site, than you need to add the following cond to the rules:

Code: Select all
RewriteCond %{HTTP:Host} !^www\.NotTheRightSite\.com$ [NC]


OR

2. You can install ISAPI_Rewrite per-site, not globally.

OR

3. Or you can use Virtual Host directive to group the rules http://www.helicontech.com/isapi_rewrit ... alHost.htm

Regards
Andrew

User avatar
Posts: 7
Joined: 11 Feb 2013, 09:20

Re: Remove rewrite from one site

16 Dec 2013, 16:29

If I use virtual host directives, does it matter that the sites that I do want to use rewrite are using .htaccess for their rules?

Do I need to restart a service or cycle the box for the changes made to httpd.conf are recognized?

Thanks,
Dan

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Remove rewrite from one site

16 Dec 2013, 16:40

Yes, it does matter if you use httpd.conf or .htaccess. Httpd.conf provides rules that affect ALL sites on the server, while .htaccess is per-site configuration files, that affect only its sites.
So you need to specify which type you're using and from what rules are you trying to protect the site.

User avatar
Posts: 7
Joined: 11 Feb 2013, 09:20

Re: Remove rewrite from one site

16 Dec 2013, 19:48

There are not any rules in my httpd.conf. The rules are in .htaccess for each site. The httpd.conf only has registration information and logging.

So the site that I do not want to use rewrite on does not have an .htacces file. The should eliminate it from testing it for matching rules, correct?

Dan

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Remove rewrite from one site

17 Dec 2013, 11:20

If httpd.conf is empty and the .htaccess for the given site is empty as well, I do not see a reason to do anything about it. Or do I get you wrong?

User avatar
Posts: 7
Joined: 11 Feb 2013, 09:20

Re: Remove rewrite from one site

17 Dec 2013, 12:17

Well, I am getting 404's, and I see entries in the rewrite log:

XX.XX.XX.XXX XX.XX.XX.XXX Tue, 17-Dec-2013 07:03:02 GMT [rest.mysite.net/sid#4][rid#29070056/initial] (2) init rewrite engine with requested uri /index.cfm/remote/create


That is the only line in the log, so IR is not trying to match a rule, but wondering why it is logging the call at all. Looks like once IR 3 is installed, it examines all incoming requests regardless of configuration.

I also read about DisableRewrite "rest.mysite.net" which I am trying to use in http.conf using the config editor but when I try to apply the change I get a "Unknown expression error". It would be nice if you could just exclude a site in the Helicon Manager.

I took the same code base and installed on a different server without IR 3 and it works as expected. I know this is circumstantial but looks somewhat convincing to me that IR 3 is my issue.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Remove rewrite from one site

18 Dec 2013, 00:48

All correct, the entry is supposed to be in the log. But that's normal. And if you were to create a similar software, wouldn't you track all requests that come to the server?

In the log you see only one line. Since there's nothing in httpd.conf and in corresponding .htaccess ISAPI_Rewrite doesn't do anything to the request. And the log supports this statement. There's nothing else we can do about disabling the ISAPI_Rewrite3 for this site.

I don't say I don't trust you, but try to uninstall ISAPI_Rewrite 3 and see if the site will work. If so, please, provide some additional info about the site (CMS? PLESK? CF? etc)

Regards

User avatar
Posts: 7
Joined: 11 Feb 2013, 09:20

Re: Remove rewrite from one site

18 Dec 2013, 16:27

Maybe, but since this is add on software to a feature that is native in the OS, I would maybe just rely on the logging of IIS. But either way, only harm here was I thought maybe IR 3 is interfering somehow, and since its not I'll keep digging. Uninstalling is not an option since there are sites they currently use IR 3.

This is a ColdFusion 10, fully patched, Coldbox framework and Coldbox's REST API called RELAX running on Windows 2008r2 and IIS 7.5

Thans for your help and if I have anything of value to add to this thread I will come back and post it.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Remove rewrite from one site

19 Dec 2013, 12:30

Well, I do not see any interference. But since you mentioned CF, here's an article that addresses the only known issue about ISAPI_Rewrite 3 performance with CF - http://www.helicontech.com/articles/adj ... aboration/ . But there's not much else to it.

Regards

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 0 guests