Forum Moderators: open

Message Too Old, No Replies

Isapi_rewrite

Isapi_rewrite Help

         

webfort

11:10 am on Jun 14, 2005 (gmt 0)

10+ Year Member



Hi, I was wondering if anyone could help me, I'm trying to set up ISAPI_REWRITE and can't seem to get it working, I have checked and it seems to be installed ok, but when testing it, nothing happens. This is what I have Windows XP Pro, i have the ISAPI_REWRITE lite version, for development work.

this is my httpd.ini file in the installation dir:-

[ISAPI_Rewrite]

# 3600 = 1 hour

RepeatLimit 32

# Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule /httpd(?:\.ini¦\.parse\.errors).* / [F,I,O]
# Block external access to the Helper ISAPI Extension
RewriteRule .*\.isrwhlp / [F,I,O]

This is the contents of httpd.ini in my site root:-

[ISAPI_Rewrite]
RewriteRule (.*?\.asp)(\?[^/]*)?/([^/]*)/([^/]*)(.*) $1(?2$2&:\?)$3=$4$5 [NS,I]

This is my url:

[localhost...]

which I will hope I can access like so:-
[localhost...]

any help would be greatly appreciated.

Thanks

Ashley

defanjos

1:18 pm on Jun 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld webfort.

I am not that good with the rules, but I think your rule is overly complicated for what you are trying to do.
I think the following should work:
RewriteRule /bes_main/product.asp/pid/([^.]+) /bes_main/product.asp\?pid=$1

One thing I always do, is test if the filter is working by using a very simple rule, that way I know it is not my rule, but something else.
For example:

RewriteRule /1.htm /2.htm

Create 2 pages:
1.htm (write only a number 1 in the page)
2.htm (write only a number 2 in the page)

Now when you type in http://www.example.com/1.htm, you should see the a number 2 (basically 2.htm is being served)

If that does not work, it can be the permissions for the root httpd.ini
Usually I have to give "Everyone" "Read" permissions, and it works.
To change permissions, right click on the file (in windows explorer) > Properties > Security