SetEnvIf - IIS 8.5

Helicon Ape provides support for Apache .htacces and .htpasswd configuration files for Microsoft IIS.
User avatar
Posts: 28
Joined: 16 May 2013, 13:13

SetEnvIf - IIS 8.5

20 Aug 2015, 19:02

Having difficultly using the SetEnvIf command in IIS 8.5 (Windows Server 2012 R2). Wondering if it's a bug, because it runs fine on my dev box, which is running IIS 7.

Some basic code, which works on dev, just does nothing on production:

Code: Select all
RewriteEngine On
RewriteBase
SetEnvIf REMOTE_ADDR (.+) REMOTE_ADDR='127.0.0.1'


My ultimate goal is actually to rewrite REMOTE_ADDR and REMOTE_HOST with an X-Forwarded-For IP.

Any insights would be greatly appreciated!

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

Re: SetEnvIf - IIS 8.5

21 Aug 2015, 19:43

Hello,

Please enable logging in httpd.conf by putting

LogLevel debug

and check error.log for related messages.

Also please clarify if you get any error with IIS8.5?

User avatar
Posts: 28
Joined: 16 May 2013, 13:13

Re: SetEnvIf - IIS 8.5

21 Aug 2015, 20:55

Thanks for the response.

There is no public error returned in IIS 8.5.

I'll enable debugging and provide the logs.

Is there a way to enable debugging only for my IP?

Thanks!

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

Re: SetEnvIf - IIS 8.5

24 Aug 2015, 22:46

Hello,

>Is there a way to enable debugging only for my IP?

If you mean logging in Ape, then unfortunately you cannot customize it - it is either enabled or disabled.

Please provide the error.log which I asked you before.

Can you also clarify why you are trying to change the REMOTE_ADDR variable?

Return to Helicon Ape

Who is online

Users browsing this forum: No registered users and 32 guests