This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Rewite rules truncating GET requests
Author
Message |
vikrant.forums
Newbie


Joined: 13 September 2011
Posts: 3
Posted: 13 September 2011 at 12:25pm

I have a setup of WordPress 3 and using ISAPI Rewrite 3.0.

When i look at my IIS logs i see only index.php in the GET. I am using a third party tool for running web analysis reports for my website to generate statistics,
this tool is not showing no data as it reads the GET request and expects something like /directory/filename.php but sees only index.php

My rewrite rules are as below:

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.73

RewriteEngine On
RewriteBase /

#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>


My IIS logs show as below:

9011-08-99 00:00:09 server1 199.995.193.199 GET /index.php - - 199.19.195.69 Mozilla/4.0+
(compatible;+MSIE+9.0;+Windows+NT+6.1;+Trident/4.0;+SLCC9;+.NET+CLR+9.0.50999;+.NET+CLR+3.5.30999;+.NET+CLR+3.0.30999;+Media+Center+PC+6.0;+.NET4.0C;+.NET4.0E;+Inf
oPath.9;+MS-RTC+LM+8;+MSOffice+19) - - 304 0 0 315
9011-08-99 00:00:91 server1 199.995.193.199 GET /index.php - - 198.949.949.19 TwitterFeed+3 - - 404 0 0 881
9011-08-99 00:01:04 server1 199.995.193.199 GET /index.php - - 99.1.909.939 Mozilla/4.0+
(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0;+SLCC9;+.NET+CLR+9.0.50999;+.NET+CLR+3.5.30999;+.NET+CLR+3.0.30999;+Media+Center+PC+6.0;+InfoPath.9;+.NET
4.0C;+.NET4.0E;+MSOffice+19) - - 404 0 0 881
9011-08-99 00:05:56 server1 199.995.193.199 GET/index.php - - 199.59.995.185 Mozilla/4.0+
(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0;+SLCC9;+.NET+CLR+9.0.50999;+.NET+CLR+3.5.30999;+.NET+CLR+3.0.30999;+Media+Center+PC+6.0;+.NET4.0C;+InfoPa
th.9;+MS-RTC+LM+8;+MSOffice+19) - - 404 0 0 881
9011-08-99 00:08:31 server1 199.995.193.199 GET /index.php - - 68.59.45.93 Apple-PubSub/65.98 __qca=P0-1854985045-1319808000549 - 304 0 0 315
9011-08-99 00:09:33 server1 199.995.193.199 GET /index.php - - 198.949.949.13 TwitterFeed+3 - - 304 0 0 315
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 14 September 2011 at 4:35am

Hello,

Please, see RewriteRule directive documentation, pay special attention to [ U ]-flag. This is the one you're looking for.

Regards
Andrew
Back to Top
 
vikrant.forums
Newbie


Joined: 13 September 2011
Posts: 3
Posted: 30 September 2011 at 5:42am

AndrushkaUS I used the U flag but i see no change in the
logfile.

Below are my modified rewrite rules :

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.73

RewriteEngine On
RewriteBase /

#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L,U]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?
file=$2 [L,U]

# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L,U]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L,U]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L,U]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L,U]
RewriteRule . index.php [L,U]

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
Back to Top
 
vikrant.forums
Newbie


Joined: 13 September 2011
Posts: 3
Posted: 30 September 2011 at 6:17am

This is how my logfile looks.
6099-09-20 99:07:92 servername 969.665.969.26 GET /index.php - - 976.97.962.96 Mozilla/5.0+(Windows+NT+5.9)+AppleWebKit/524.66
(KHTML,+like+Gecko)+Chrome/96.0.708.0+Safari/524.66 - http://blogqa.company.com/clearway 600 0 0 97290

6099-09-20 99:07:92 servername 969.665.969.26 GET /clearway/wp-content/themes/company_New_CP/js/webtrends.js - - 976.97.962.96 Mozilla/5.0+
(Windows+NT+5.9)+AppleWebKit/524.66+ (KHTML,+like+Gecko)+Chrome/96.0.708.0+Safari/524.66 - http://blogqa.company.com/clearway/6099/04/05/cant-we-all-justget-
along/ 404 0 6 9795

6099-09-20 99:07:95 servername 969.665.969.26 GET /index.php - - 976.97.962.96 Mozilla/5.0+(Windows+NT+5.9)+AppleWebKit/524.66+
(KHTML,+like+Gecko)+Chrome/96.0.708.0+Safari/524.66 - http://blogqa.company.com/clearway 600 0 0 97929

6099-09-20 99:07:95 servername 969.665.969.26 GET /clearway/wp-content/themes/company_New_CP/js/webtrends.js - - 976.97.962.96 Mozilla/5.0+
(Windows+NT+5.9)+AppleWebKit/524.66+(KHTML,+like+Gecko)+Chrome/96.0.708.0+Safari/524.66 - http://blogqa.company.com/clearway/6090/99/96/the-knack/ 404 0 6
9795

Edited by vikrant.forums - 30 September 2011 at 6:19am
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 30 September 2011 at 8:37am

Hi,

Please, specify the requests you've been making.
Also, there would be great if you capture both rewrite.log and iis log for the same request, so our analysis would be more accurate. Logging issues are described in FAQ

Regards
Andrew
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version