mod_rewrite on windows200 cant access URL variables

Hi people

I have a mod-rewrite which works on my linux server, BUT I want to develop on my local windows 2000 machine. I am using

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]*)$ /$1.php [L,NC]
RewriteRule ^([^/]*)/([^/]*)$ /$1.php?level_1=$2 [L,NC]

I have a phpinfo.php file which does a phpinfo(); to show all the settings.
The rewrite works ok.  ie http://localhost/phpinfo/1    rewrites as phpinfo.php?level1=1 (there is no subdirectory /1)

The big problem is that although linux shows $_GET variables, windows doesnt.

I get the following:-

WINDOWS 2000, Apache 1.3.28
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /phpinfo/1
_SERVER["SCRIPT_NAME"] /phpinfo
_SERVER["PATH_INFO"] /1
_SERVER["PATH_TRANSLATED"] c:\\wwwroot\\1
_SERVER["PHP_SELF"] /phpinfo/1
_SERVER["argv"] Array
(
)
 
_SERVER["argc"] 0

LINUX, Apache 1.3.29
_SERVER["REQUEST_URI"] /phpinfo/1
_SERVER["SCRIPT_NAME"] /phpinfo.php
_SERVER["PATH_INFO"] /phpinfo.php
_SERVER["PATH_TRANSLATED"] /homepages/15/d38847442/htdocs/phpinfo.php
_SERVER["STATUS"] 200
_SERVER["PHP_SELF"] /phpinfo.php
_SERVER["argv"] Array
(
    [0] => level_1=1
)
 
_SERVER["argc"] 1
LVL 9
waygoodAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DemiurgCommented:
Can you provide apache rewrite logs for this request?
waygoodAuthor Commented:
I have access.log and error.log, is there a specific rewrite log, if so how would i set it up?
Also if the pages are being shown without error, as above, what would this tell you about why the $_get isnt being populated. There is no directory c:\wwwroot\1 so this would have normally generated a 404 page, but the rewrite worked and used the phpinfo script in c:\wwwroot.

here is the access.log for the pages, the 404's were where I was testing.

127.0.0.1 - - [15/Jun/2004:14:59:08 +0100] "GET /phpinfo/1 HTTP/1.1" 200 38040
127.0.0.1 - - [15/Jun/2004:14:59:09 +0100] "GET /phpinfo/1?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2974
127.0.0.1 - - [15/Jun/2004:14:59:09 +0100] "GET /phpinfo/1?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 4459
127.0.0.1 - - [15/Jun/2004:14:59:23 +0100] "GET /phpinfo/1/2 HTTP/1.1" 404 287
127.0.0.1 - - [15/Jun/2004:14:59:38 +0100] "GET /phpinfo/1/2 HTTP/1.1" 404 287
127.0.0.1 - - [15/Jun/2004:14:59:57 +0100] "GET /phpinfo/1/2 HTTP/1.1" 404 287
127.0.0.1 - - [15/Jun/2004:15:00:00 +0100] "GET /phpinfo/1/2 HTTP/1.1" 404 287
127.0.0.1 - - [15/Jun/2004:15:00:04 +0100] "GET /phpinfo HTTP/1.1" 200 38024
127.0.0.1 - - [15/Jun/2004:15:00:04 +0100] "GET /phpinfo?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 4459
127.0.0.1 - - [15/Jun/2004:15:00:04 +0100] "GET /phpinfo?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2974
127.0.0.1 - - [15/Jun/2004:15:00:40 +0100] "GET /phpinfo/1/2 HTTP/1.1" 404 287
127.0.0.1 - - [15/Jun/2004:15:00:42 +0100] "GET /phpinfo/1/ HTTP/1.1" 404 287
127.0.0.1 - - [15/Jun/2004:15:02:37 +0100] "GET /phpinfo/1 HTTP/1.1" 200 37557
127.0.0.1 - - [15/Jun/2004:15:02:37 +0100] "GET /phpinfo/1?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 4459
127.0.0.1 - - [15/Jun/2004:15:02:38 +0100] "GET /phpinfo/1?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2974
127.0.0.1 - - [15/Jun/2004:15:03:18 +0100] "GET /phpinfo/1/2 HTTP/1.1" 200 38063
127.0.0.1 - - [15/Jun/2004:15:03:18 +0100] "GET /phpinfo/1/2?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 4459
127.0.0.1 - - [15/Jun/2004:15:03:19 +0100] "GET /phpinfo/1/2?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2974
127.0.0.1 - - [15/Jun/2004:15:04:06 +0100] "GET /phpinfo/1/2/ HTTP/1.1" 200 38075
127.0.0.1 - - [15/Jun/2004:15:04:06 +0100] "GET /phpinfo/1/2/?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2974
127.0.0.1 - - [15/Jun/2004:15:04:06 +0100] "GET /phpinfo/1/2/?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 4459
DemiurgCommented:
No, I mean log created by RewriteLog directive:

---
The RewriteLog directive sets the name of the file to which the server logs any rewriting actions it performs. If the name does not begin with a slash ('/') then it is assumed to be relative to the Server Root. The directive should occur only once per server config.

Example:

RewriteLog "/usr/local/var/apache/logs/rewrite.log"
---


Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

waygoodAuthor Commented:
okay got it installed with log level of 3 and got:-

127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/1
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/1 -> phpinfo.php/1
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php/1'
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/1
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/1 -> phpinfo.php/1
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)/([^/]*)$' to uri 'phpinfo.php/1'
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd2468/initial] (2) [per-dir c:/wwwroot/] rewrite phpinfo.php/1 -> /phpinfo.php.php?level_1=1
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) split uri=/phpinfo.php.php?level_1=1 -> uri=/phpinfo.php.php, args=level_1=1
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd2468/initial] (1) [per-dir c:/wwwroot/] internal redirect with /phpinfo.php.php [INTERNAL REDIRECT]
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#b5e178/initial/redir#1] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php.php -> phpinfo.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#b5e178/initial/redir#1] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php.php'
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#b5e178/initial/redir#1] (2) [per-dir c:/wwwroot/] rewrite phpinfo.php.php -> /phpinfo.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#b5e178/initial/redir#1] (1) [per-dir c:/wwwroot/] internal redirect with /phpinfo.php.php.php [INTERNAL REDIRECT]
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd7c78/initial/redir#2] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php.php.php -> phpinfo.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd7c78/initial/redir#2] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php.php.php'
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd7c78/initial/redir#2] (2) [per-dir c:/wwwroot/] rewrite phpinfo.php.php.php -> /phpinfo.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd7c78/initial/redir#2] (1) [per-dir c:/wwwroot/] internal redirect with /phpinfo.php.php.php.php [INTERNAL REDIRECT]
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd9cb8/initial/redir#3] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php.php.php.php -> phpinfo.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd9cb8/initial/redir#3] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php.php.php.php'
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd9cb8/initial/redir#3] (2) [per-dir c:/wwwroot/] rewrite phpinfo.php.php.php.php -> /phpinfo.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dd9cb8/initial/redir#3] (1) [per-dir c:/wwwroot/] internal redirect with /phpinfo.php.php.php.php.php [INTERNAL REDIRECT]
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1ddbce0/initial/redir#4] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php.php.php.php.php -> phpinfo.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1ddbce0/initial/redir#4] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php.php.php.php.php'
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1ddbce0/initial/redir#4] (2) [per-dir c:/wwwroot/] rewrite phpinfo.php.php.php.php.php -> /phpinfo.php.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1ddbce0/initial/redir#4] (1) [per-dir c:/wwwroot/] internal redirect with /phpinfo.php.php.php.php.php.php [INTERNAL REDIRECT]
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dddd20/initial/redir#5] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php.php.php.php.php.php -> phpinfo.php.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dddd20/initial/redir#5] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php.php.php.php.php.php'
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dddd20/initial/redir#5] (2) [per-dir c:/wwwroot/] rewrite phpinfo.php.php.php.php.php.php -> /phpinfo.php.php.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1dddd20/initial/redir#5] (1) [per-dir c:/wwwroot/] internal redirect with /phpinfo.php.php.php.php.php.php.php [INTERNAL REDIRECT]
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1ddfd60/initial/redir#6] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php.php.php.php.php.php.php -> phpinfo.php.php.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1ddfd60/initial/redir#6] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php.php.php.php.php.php.php'
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1ddfd60/initial/redir#6] (2) [per-dir c:/wwwroot/] rewrite phpinfo.php.php.php.php.php.php.php -> /phpinfo.php.php.php.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1ddfd60/initial/redir#6] (1) [per-dir c:/wwwroot/] internal redirect with /phpinfo.php.php.php.php.php.php.php.php [INTERNAL REDIRECT]
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de2028/initial/redir#7] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php.php.php.php.php.php.php.php -> phpinfo.php.php.php.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de2028/initial/redir#7] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php.php.php.php.php.php.php.php'
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de2028/initial/redir#7] (2) [per-dir c:/wwwroot/] rewrite phpinfo.php.php.php.php.php.php.php.php -> /phpinfo.php.php.php.php.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de2028/initial/redir#7] (1) [per-dir c:/wwwroot/] internal redirect with /phpinfo.php.php.php.php.php.php.php.php.php [INTERNAL REDIRECT]
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de42f8/initial/redir#8] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php.php.php.php.php.php.php.php.php -> phpinfo.php.php.php.php.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de42f8/initial/redir#8] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php.php.php.php.php.php.php.php.php'
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de42f8/initial/redir#8] (2) [per-dir c:/wwwroot/] rewrite phpinfo.php.php.php.php.php.php.php.php.php -> /phpinfo.php.php.php.php.php.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de42f8/initial/redir#8] (1) [per-dir c:/wwwroot/] internal redirect with /phpinfo.php.php.php.php.php.php.php.php.php.php [INTERNAL REDIRECT]
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de65d8/initial/redir#9] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php.php.php.php.php.php.php.php.php.php -> phpinfo.php.php.php.php.php.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de65d8/initial/redir#9] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php.php.php.php.php.php.php.php.php.php'
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de65d8/initial/redir#9] (2) [per-dir c:/wwwroot/] rewrite phpinfo.php.php.php.php.php.php.php.php.php.php -> /phpinfo.php.php.php.php.php.php.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de65d8/initial/redir#9] (1) [per-dir c:/wwwroot/] internal redirect with /phpinfo.php.php.php.php.php.php.php.php.php.php.php [INTERNAL REDIRECT]
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de88d0/initial/redir#10] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php.php.php.php.php.php.php.php.php.php.php -> phpinfo.php.php.php.php.php.php.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de88d0/initial/redir#10] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php.php.php.php.php.php.php.php.php.php.php'
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de88d0/initial/redir#10] (2) [per-dir c:/wwwroot/] rewrite phpinfo.php.php.php.php.php.php.php.php.php.php.php -> /phpinfo.php.php.php.php.php.php.php.php.php.php.php.php
127.0.0.1 - - [16/Jun/2004:13:32:03 +0100] [localhost/sid#515828][rid#1de88d0/initial/redir#10] (1) [per-dir c:/wwwroot/] internal redirect with /phpinfo.php.php.php.php.php.php.php.php.php.php.php.php [INTERNAL REDIRECT]
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/1/
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/1/ -> phpinfo.php/1/
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php/1/'
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/1/
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/1/ -> phpinfo.php/1/
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)/([^/]*)$' to uri 'phpinfo.php/1/'
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (1) [per-dir c:/wwwroot/] pass through c:/wwwroot/phpinfo.php
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/1/
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/1/ -> phpinfo.php/1/
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php/1/'
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/1/
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/1/ -> phpinfo.php/1/
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)/([^/]*)$' to uri 'phpinfo.php/1/'
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd2468/initial] (1) [per-dir c:/wwwroot/] pass through c:/wwwroot/phpinfo.php
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/1/
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/1/ -> phpinfo.php/1/
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)$' to uri 'phpinfo.php/1/'
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/1/
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/1/ -> phpinfo.php/1/
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/]*)/([^/]*)$' to uri 'phpinfo.php/1/'
127.0.0.1 - - [16/Jun/2004:13:32:06 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (1) [per-dir c:/wwwroot/] pass through c:/wwwroot/phpinfo.php
DemiurgCommented:
I see that your rewrite rules are resulted in recursion

Consider changing

RewriteRule ^([^/]*)$ /$1.php [L,NC]
RewriteRule ^([^/]*)/([^/]*)$ /$1.php?level_1=$2 [L,NC]

into

RewriteRule ^([^/.]*)$ /$1.php [L,NC]
RewriteRule ^([^/.]*)/([^/]*)$ /$1.php?level_1=$2 [L,NC]

I've not testet this, but if problem still persis, i'll dig deeper ;)
waygoodAuthor Commented:
funny enough thats what i am doing now and the log produces:-

127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/6/
127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/6/ -> phpinfo.php/6/
127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/.]*)$' to uri 'phpinfo.php/6/'
127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/6/
127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/6/ -> phpinfo.php/6/
127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/.]*)/([^/]*)$' to uri 'phpinfo.php/6/'
127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (1) [per-dir c:/wwwroot/] pass through c:/wwwroot/phpinfo.php
127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/6/
127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/6/ -> phpinfo.php/6/
127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/.]*)$' to uri 'phpinfo.php/6/'
127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/6/
127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/6/ -> phpinfo.php/6/
127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/.]*)/([^/]*)$' to uri 'phpinfo.php/6/'
127.0.0.1 - - [16/Jun/2004:13:46:07 +0100] [localhost/sid#515828][rid#1ddce10/initial] (1) [per-dir c:/wwwroot/] pass through c:/wwwroot/phpinfo.php
127.0.0.1 - - [16/Jun/2004:13:46:08 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/6/
127.0.0.1 - - [16/Jun/2004:13:46:08 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/6/ -> phpinfo.php/6/
127.0.0.1 - - [16/Jun/2004:13:46:08 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/.]*)$' to uri 'phpinfo.php/6/'
127.0.0.1 - - [16/Jun/2004:13:46:08 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (3) [per-dir c:/wwwroot/] add path-info postfix: c:/wwwroot/phpinfo.php -> c:/wwwroot/phpinfo.php/6/
127.0.0.1 - - [16/Jun/2004:13:46:08 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (3) [per-dir c:/wwwroot/] strip per-dir prefix: c:/wwwroot/phpinfo.php/6/ -> phpinfo.php/6/
127.0.0.1 - - [16/Jun/2004:13:46:08 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (3) [per-dir c:/wwwroot/] applying pattern '^([^/.]*)/([^/]*)$' to uri 'phpinfo.php/6/'
127.0.0.1 - - [16/Jun/2004:13:46:08 +0100] [localhost/sid#515828][rid#1dd8de0/initial] (1) [per-dir c:/wwwroot/] pass through c:/wwwroot/phpinfo.php
DemiurgCommented:
Should only 2nd line be enough, a bit modified... ?

RewriteRule ^/([^/.]*?)/(.*)$ /$1.php?level_1=$2 [L,NC]
waygoodAuthor Commented:
should be but the big picture is:-
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]*)$ /$1.php [L,NC]
RewriteRule ^([^/]*)/([^/]*)$ /$1.php?level_1=$2 [L,NC]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /$1.php?level_1=$2&level_2=$3 [L,NC]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /$1.php?level_1=$2&level_2=$3&level_3=$4 [L,NC]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /$1.php?level_1=$2&level_2=$3&level_3=$4&level_4=$5 [L,NC]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)(/([^/]*))?$ /$1.php?level_1=$2&level_2=$3&level_3=$4&level_4=$5&level_5=$6&$8[L,NC]
DemiurgCommented:
I think it is better to pass all part after phpinfo/[from here till end] to phpinfo.php - and let phpinfo.php itself handle request string - i.e. using split( "/", $level_1 ) .... ?
waygoodAuthor Commented:
then I would have to include this in all scripts, which defeats the object of using it, after all it works on my linux server.
DemiurgCommented:
Ok, got it

So what is your state for now? Was my last proposed rule helpful?
waygoodAuthor Commented:
nope, I still have no url passed values.

_SERVER["REQUEST_URI"] /phpinfo/q
_SERVER["SCRIPT_NAME"] /phpinfo
_SERVER["PATH_INFO"] /q
_SERVER["PATH_TRANSLATED"] c:\\wwwroot\\q
_SERVER["PHP_SELF"] /phpinfo/q
_SERVER["argv"] Array
(
)
 
_SERVER["argc"] 0
waygoodAuthor Commented:
GOT IT!!!!!!!

Bl**dy windows OS

i removed the .htaccess file and http://localhost/phpinfo/x   was still doing phpinfo.php
I added a directory called phpinfo and it worked - giving a directory listing

I re-created the .htaccess and voila it worked.

So basically if a directory doesnt exist it looks for a script (.php .html) and then uses that with further parameters sdded to the end of it.

I have to find a workaround for that now.
DemiurgCommented:
:-\ maybe some mess with rewrite_conf ... -f  on win32 ?
waygoodAuthor Commented:
the problem lies in here somewhere

with URL http://localhost/index/q  we get:-
add path-info postfix: c:/wwwroot/index.php -> c:/wwwroot/index.php/q
strip per-dir prefix: c:/wwwroot/index.php/q -> index.php/q
applying pattern '^([^/.]*)$' to uri 'index.php/q'

I dont want index.php/q though!!!!!    argghhhhh!!!
DemiurgCommented:
And what is on linux in this case ?

But we can change rules to work with  'index.php/q' ?
waygoodAuthor Commented:
dont have access to linux logs, but yes we can now at least change the rules
DemiurgCommented:
What's the state of your rewrite research? Have you managed to change the rules accordingly?
waygoodAuthor Commented:
yes I think abandon is the best. No luck on the Win re-write
moduloCommented:
PAQed, with points refunded (125)

modulo
Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.