This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions
 Helicon Tech : Common Questions
Subject Topic: Exclude real files and directories + Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
basfluijt
Newbie
Newbie


Joined: 28 June 2011
Location: Netherlands
Online Status: Offline
Posts: 2
Posted: 28 June 2011 at 2:37am | IP Logged Quote basfluijt

Hello Everyone,

I'm running into a problem with my ISAPI Rewrite Rules. Our websites require some parameters (ASP) to function so the middle-tear can determine the correct action to take etc.

Our URL's look like this without the ISAPI Rewrite:
/asp/appmain.asp?appactie=home

With ISAPI Rewrite it looks like this:
/home

We use the following Rules to achieve this result.
RewriteCond %{URL} ^(?!/(.*/.+(?!xml|w))$)
RewriteRule ^/(.*) /asp/appmain.asp?appactie=$1 [I,L]

This seems to do the trick, although by using this method we kill all the SEO methods we have put in the root of the directory. Think of the Sitemap files etc. They will all be Rewritten by the ISAPI Rewrite.

We are looking for a clean way to alter the Rules so the "real" files can be found (sitemap.xml, robots.txt) that are mainly in the root directory.

We have tried adding:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

This resulted into a complete ignore of the ISAPI Rewrite.

We are using IIS6 and 7 on windows 2008/2003 server.
DLL Filename: IsapiRewrite4.dll
INI Filename: IsapiRewrite4.ini

Can someone help us out?
Thanks!
Back to Top View basfluijt's Profile Search for other posts by basfluijt
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 30 June 2011 at 9:02am | IP Logged Quote Guests

Hello,

Please, provide the rewrite.log for the testing request using:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

Logging issues described in FAQ


Regards
Andrew
Back to Top View Guests's Profile Search for other posts by Guests
 
basfluijt
Newbie
Newbie


Joined: 28 June 2011
Location: Netherlands
Online Status: Offline
Posts: 2
Posted: 27 July 2011 at 4:49am | IP Logged Quote basfluijt

Hi Andrew,

Thanks for taking the time to look into this matter. I'm really stuck here.

the complete ini file is now:
=======================================
# IsapiRewrite4.ini
#
# sample ini file for the ISAPI rewriter.
#
# comment lines begin with #
#
# These are the currently  supported directives for the ini file:
#
#  IterationLimit
#  MaxMatchCount 
#  RewriteRule
#  RewriteLog 
#  RewriteLogLevel
#  RewriteCond
#
#
# Check the examples below for how to use each one.
# See the Readme.txt for full explanation of the rules here.
#
#
# Wed, 07 Sep 2005  09:01
#
# The set of rewrite rules in this file is partially for illustration, and
# partially for filtering ad requests.  I also have a hosts file that
# redirects known ad servers to my local machine, as per
# http://www.mvps.org/winhelp2002/hosts.htm .
#
# This rewrite rule file redirects the ad requests to the local machine, to a
# "filtered.htm" file.  You drop the "filtered.htm"  into c:\inetsrv\wwwroot and
# you can put anything you like into the filtered.htm  file.  It will display for
# every filtered ad.
#
# Wed, 13 Apr 2005  09:54

RewriteLog  D:\Inetpub\zakencentrum-nieuwegein\log\isapi2.log  
RewriteLogLevel 1

# MaxMatchCount
#
# Specifies the maximum number of sub-expression matches to
# capture for a single pattern. This specifies the size of the
# array in the C module.  If you have a pattern with more than
# the default number of matches, set this number.
#
# The default is 10.

MaxMatchCount 20


RewriteCond %{URL} ^(?!/(.*/.+(?!xml|w|html))$)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*) /asp/appmain.asp?appactie=$1 [I,L]

============================================







The logfile shows the following:

============================================

--------------------------------------------
Wed Jul 27 11:43:24 2011 - LogFile re-opened.
Wed Jul 27 11:43:33 2011 - New Url: '/home'
Wed Jul 27 11:43:33 2011 - Rewrite Url to: '/asp/appmain.asp?appactie=home'
Wed Jul 27 11:43:33 2011 - New Url: '/xml/huur_winkelruimte.xml'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/js/controles_representatie.js'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/js/controles_library.js'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/js/sessielib.js'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/js/controles_library.js'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/css/reset.css'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/css/fonts.css'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/css/grids.css'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/js/sessielib.js'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/css/zc_ngein.css'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/img/menu_img_huurders.jpg'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/img/impressie_voorzijde.jpg'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/img/menu_img_ruimte.jpg'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/img/button_brochure_winkel.jpg'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/img/button_brochure_kantoren.jpg'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/img/voorzijdewinkel2.jpg'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/img/plattegrond.jpg'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/img/vergaderruimte.jpg'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/img/routekaart.jpg'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/img/body_bg.gif'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/img/menu_item_bg.jpg'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/img/head.jpg'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/favicon.ico'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/favicon.ico'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:33 2011 - New Url: '/favicon.ico'
Wed Jul 27 11:43:33 2011 - No Rewrite
Wed Jul 27 11:43:35 2011 - New Url: '/algemene_informatie'
Wed Jul 27 11:43:35 2011 - No Rewrite
Wed Jul 27 11:43:37 2011 - New Url: '/algemene_informatie'
Wed Jul 27 11:43:37 2011 - No Rewrite
Wed Jul 27 11:43:37 2011 - New Url: '/algemene_informatie'
Wed Jul 27 11:43:37 2011 - No Rewrite
Wed Jul 27 11:43:45 2011 - Detected change in the  ini file. . .
Wed Jul 27 11:43:45 2011 - Ionic URL Rewriting ISAPI Filter v1.2.10
Wed Jul 27 11:43:45 2011 - ReadConfig
Wed Jul 27 11:43:45 2011 - LogFile re-opened.
Wed Jul 27 11:43:45 2011 - Read .ini file: new log file name: D:\Inetpub\zakencentrum-nieuwegein\log\isapi2.log.1320.log
Wed Jul 27 11:43:45 2011 - Read .ini file: setting LogLevel to 1
Wed Jul 27 11:43:45 2011 - ini line  59: RewriteCond %{URL}                                         ^(?!/(.*/.+(?!xml|w|html))$)             
Wed Jul 27 11:43:45 2011 - ini line  60: RewriteCond %{REQUEST_FILENAME}                            !-f                                      
Wed Jul 27 11:43:45 2011 - ini line  61: RewriteCond %{REQUEST_FILENAME}                            !-d                                      
Wed Jul 27 11:43:45 2011 - ini line  62: RewriteRule   1 ^/(.*)                                         /asp/appmain.asp?appactie=$1                  [I,L]
Wed Jul 27 11:43:45 2011 - Done reading .ini file: Found 1 rules (0 failed) on 63 lines

--------------------------------------------
Wed Jul 27 11:43:45 2011 - LogFile re-opened.
Wed Jul 27 11:43:45 2011 - Detected change in the  ini file. . .
Wed Jul 27 11:43:45 2011 - Ionic URL Rewriting ISAPI Filter v1.2.10
Wed Jul 27 11:43:45 2011 - ReadConfig
Wed Jul 27 11:43:45 2011 - LogFile re-opened.
Wed Jul 27 11:43:45 2011 - Read .ini file: new log file name: D:\Inetpub\zakencentrum-nieuwegein\log\isapi2.log.1320.log
Wed Jul 27 11:43:45 2011 - Read .ini file: setting LogLevel to 1
Wed Jul 27 11:43:45 2011 - ini line  59: RewriteCond %{URL}                                         ^(?!/(.*/.+(?!xml|w|html))$)             
Wed Jul 27 11:43:45 2011 - ini line  60: RewriteCond %{REQUEST_FILENAME}                            !-f                                      
Wed Jul 27 11:43:45 2011 - ini line  61: RewriteCond %{REQUEST_FILENAME}                            !-d                                      
Wed Jul 27 11:43:45 2011 - ini line  62: RewriteRule   1 ^/(.*)                                         /asp/appmain.asp?appactie=$1                  [I,L]
Wed Jul 27 11:43:45 2011 - Done reading .ini file: Found 1 rules (0 failed) on 63 lines

--------------------------------------------
Wed Jul 27 11:43:45 2011 - LogFile re-opened.
Wed Jul 27 11:43:47 2011 - New Url: '/algemene_informatie'
Wed Jul 27 11:43:47 2011 - Rewrite Url to: '/asp/appmain.asp?appactie=algemene_informatie'
Wed Jul 27 11:43:47 2011 - New Url: '/xml/alg_informatie.xml'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/css/reset.css'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/js/sessielib.js'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/css/fonts.css'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/css/grids.css'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/css/zc_ngein.css'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/js/controles_representatie.js'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/js/controles_library.js'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/js/controles_library.js'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/js/sessielib.js'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/img/pic_09.jpg'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/img/body_bg.gif'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/img/menu_img_huurders.jpg'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/img/menu_img_ruimte.jpg'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/img/button_brochure_winkel.jpg'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/img/button_brochure_kantoren.jpg'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/img/head.jpg'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:47 2011 - New Url: '/img/menu_item_bg.jpg'
Wed Jul 27 11:43:47 2011 - No Rewrite
Wed Jul 27 11:43:49 2011 - New Url: '/algemene_informatie'
Wed Jul 27 11:43:49 2011 - No Rewrite
Wed Jul 27 11:43:49 2011 - New Url: '/algemene_informatie'
Wed Jul 27 11:43:49 2011 - No Rewrite
Wed Jul 27 11:43:50 2011 - New Url: '/algemene_informatie'
Wed Jul 27 11:43:50 2011 - No Rewrite
Wed Jul 27 11:43:50 2011 - New Url: '/algemene_informatie'
Wed Jul 27 11:43:50 2011 - No Rewrite
Wed Jul 27 11:43:51 2011 - New Url: '/algemene_informatie'
Wed Jul 27 11:43:51 2011 - No Rewrite


Can you help us out?
Thanks!

With kind regards,
Bas Fluijt
Back to Top View basfluijt's Profile Search for other posts by basfluijt
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 27 July 2011 at 5:14am | IP Logged Quote Guests

Now, when you provided log and said about IsapiRewrite4.ini, I can say that it's not our product. I couldn't tell in the beginning, but now it's obvious.
It's Ionics ISAPI Rewrite module with Code Igniter.

Regards
Andrew
Back to Top View Guests's Profile Search for other posts by Guests
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum