Cannot get Rewrite to fire. (tried FAQ)

ISAPI_Rewrite is a powerful URL manipulation engine based on regular expressions
User avatar
Posts: 6
Joined: 17 Jul 2012, 12:45

Cannot get Rewrite to fire. (tried FAQ)

17 Jul 2012, 12:54

We have a production instance that is running Rewrite and it is doing so just fine.

However I am trying to configure the same setup on other servers/VMs with no luck. No luck being that no rewriting appears to be taking place no matter what the ini file holds.

- DLL is loaded into ISAPI Filters in IIS 6 (build 2.15.2.78).
- httpd.ini file is in the solution directory that is just above the applications it does the routing for.
- I read through the FAQ and diluted the ini file down to what is below and it doesn't appear to be hitting:

[ISAPI_Rewrite]

#Turns the rewrite engine on.
RewriteEngine on

### subdomain redirect v2 ###
RewriteRule .? - [F]


Agian, all of this is mirroring and using the same files running in production at the moment. Any help at all would be appreciated.

Thanks.

Edit: I checked the Event Viewer and nothing is showing up in the Application Errors as well.

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: Cannot get Rewrite to fire. (tried FAQ)

18 Jul 2012, 06:34

Hello,

First, please notice that you can have a per-site config only in the root of the site, you can't put it into sub-folders.

And your testing rule is for verison 3, so please conside using the following rule instead:

RewriteRule /testtest.* http\://www.google.com [I,RP]

And test request should be like www.yoursite.com/testtest

User avatar
Posts: 6
Joined: 17 Jul 2012, 12:45

Re: Cannot get Rewrite to fire. (tried FAQ)

19 Jul 2012, 00:45

Updated file contents to have the rule shown below and same result. Maybe some further info would help. The solution is setup as:

[solution directory]
|---> httpd.ini
|-> [site1 directory]
|-> [site2 directory]
|-> [site3 directory]

IIS is setup to direct users to localhost/site1/ and when they click on certain links they are taken to either localhost/site2 or localhost/site3

I took the ini file and moved it from the solution directory down into the site directories and back with the same outcome.

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

Re: Cannot get Rewrite to fire. (tried FAQ)

19 Jul 2012, 07:19

Hello,

In our documentation it is stated:

Configuration file format
There are two types of configuration files - global (server-level) and individual (site-level) files. The global configuration file should be named httpd.ini and should appear in the ISAPI_Rewrite installation directory.


Regards
Andrew

User avatar
Posts: 6
Joined: 17 Jul 2012, 12:45

Re: Cannot get Rewrite to fire. (tried FAQ)

19 Jul 2012, 10:42

Same deal. I removed the site level files to centralize the logic in the server level ini file.

[ISAPI_Rewrite]

#Turns the rewrite engine on.
RewriteEngine on

### subdomain redirect v2 ###
RewriteRule /testtest.* http\://www.google.com [I,RP]

Just returns a 404 error for localhost/site1/testtest.

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: Cannot get Rewrite to fire. (tried FAQ)

21 Jul 2012, 10:03

Please try to have the following config on the global level:

[ISAPI_Rewrite]

### subdomain redirect v2 ###
RewriteRule /site1/testtest.* http\://www.google.com [I,RP]

Request localhost/site1/testtest once again.
Also check httpd.parse.errors file in ISAPI_Rewrite installation folder for possible messages.

User avatar
Posts: 6
Joined: 17 Jul 2012, 12:45

Re: Cannot get Rewrite to fire. (tried FAQ)

23 Jul 2012, 09:45

Alright, now we are getting somewhere - got routed off to google. I also downloaded and installed the trial version of Rewrite 2.x to use a clean library from your site instead of what I was provided and things seem to only work when that .DLL is mounted in IIS.

Having said that, the existing .DLL is operational in production so I am thinking it is not as simply as copying those files down from the server since a full installation seemed to help the issue.

I am assuming there is some licensing stuff I need to configure on a server or VM before this will be operational? We were just kind of handed this solution from someone with little support to go on so I apologize for the chaos.

User avatar
Posts: 6
Joined: 17 Jul 2012, 12:45

Re: Cannot get Rewrite to fire. (tried FAQ)

25 Jul 2012, 11:51

....?

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

Re: Cannot get Rewrite to fire. (tried FAQ)

25 Jul 2012, 12:04

yes?

User avatar
Posts: 6
Joined: 17 Jul 2012, 12:45

Re: Cannot get Rewrite to fire. (tried FAQ)

25 Jul 2012, 17:54

Ha, sorry, I guess I did phrase that rhetorically.

My remaining question - is there licensing items I need to locate on the production server (files, registry entries, etc.) to transfer over in order for the routing to work? If so, where are they?

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

Re: Cannot get Rewrite to fire. (tried FAQ)

26 Jul 2012, 05:45

Here's how to register your product: Start->Helicon->ISAPI_Rewrite->ISAPI_Rewrite Configuration Utility
If you mean to register the .dll files in system, please, see documentation

Regards
Andrew

Return to ISAPI_Rewrite 2.x

Who is online

Users browsing this forum: No registered users and 6 guests