ISAPI Rewrite Syntax

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 5
Joined: 10 Jun 2013, 14:09

ISAPI Rewrite Syntax

10 Jun 2013, 16:36

Can someone help me with the syntax to accomplish the following, I'm in a time crunch and need to get this working asap:)

Current URL is xyz.com/folder

I need to keep the URL xyz.com/folder but forward to an IP address such as 200.14.32.3/folder. Please help:)

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

Re: ISAPI Rewrite Syntax

10 Jun 2013, 18:04

Hello,

It's called proxying.
You'd need:

Code: Select all
RewriteEngine on
RewriteBase /

RewriteCond %{HTTP:Host} ^xyz\.com$ [NC]
RewriteRule ^folder$ http:\\200.14.32.3/folder [NC,P,L]


Regards
Andrew

User avatar
Posts: 5
Joined: 10 Jun 2013, 14:09

Re: ISAPI Rewrite Syntax

10 Jun 2013, 21:27

This is what I came up with and I placed in in the online-graduate-degree directory. Is this correct? I'm getting a Directory Listing Denied but I should be getting a login screen since I checked the IP address URL. Am I doing something incorrectly.

RewriteEngine on
RewriteBase /

RewriteCond %{HTTP:Host} ^harrisburgu\.edu$ [NC]
RewriteRule ^online-graduate-degrees$ http:\\166.78.104.118/online-graduate-degree [NC,P,L]

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

Re: ISAPI Rewrite Syntax

11 Jun 2013, 01:13

Maybe the rules simply doesn't work.
Would you, please, enable logging and provide us with rewrite.log with a testing request. Logging issues described in FAQ (http://www.helicontech.com/forum/10648-FAQ.html)

Regards
Andrew

User avatar
Posts: 5
Joined: 10 Jun 2013, 14:09

Re: ISAPI Rewrite Syntax

11 Jun 2013, 11:20

Andrew, it will not let me attach the log. I have changed the extension to .txt and still won't allow upload. I'm linking to the log from skydrive so you can look at it.

https://skydrive.live.com/redir?resid=395C53A67C80EA80!2847&authkey=!ACz7so_-VHm9RLs

Thanks for the help.

Maybe I'm misunderstanding, but it looks like it goes through each file in the site to try to match the pattern, is this correct? Do I need anything in the local folder such as an index page or should this re-direct (proxy) without anything in the folder.

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

Re: ISAPI Rewrite Syntax

11 Jun 2013, 20:23

Here's an extract:

Code: Select all
(2) init rewrite engine with requested uri /online-graduate-degrees/
 (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
 (3) applying pattern '^(.*)$' to uri 'online-graduate-degrees/'
 (4) RewriteCond: input='C:\Inetpub\vhosts\harrisburgu.net\httpdocs\online-graduate-degrees\' pattern='!!-f' => matched
 (4) RewriteCond: input='C:\Inetpub\vhosts\harrisburgu.net\httpdocs\online-graduate-degrees\' pattern='!!-d' => not-matched
 (1) Htaccess process request c:\inetpub\vhosts\harrisburgu.net\httpdocs\online-graduate-degrees\.htaccess
 (3) applying pattern '^online-graduate-degrees$' to uri 'online-graduate-degrees/'


The last lines seems to tell everything. All you need is just '/' at the end.

Maybe I'm misunderstanding, but it looks like it goes through each file in the site to try to match the pattern, is this correct? Do I need anything in the local folder such as an index page or should this re-direct (proxy) without anything in the folder.


Technically, not 'each file', but each incoming request. No, you don't anything there.

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 25 guests