
November 17th, 2003, 11:37 AM
|
|
Contributing User
|
|
Join Date: Jan 2003
Posts: 32
Time spent in forums: < 1 sec
Reputation Power: 6
|
|
|
mod_rewrite Problems
Hi, not sure if this is the right place to post this but I couldn't find another forum suitable (It has something to do with PHP, so I guess it fits).
Anyway, I have set up Apache 1.3.26 and enabled mod_rewrite on it. My problem is, I can get mod_rewrite to redirect the user to the php script fine, but the script doesn't pick up on the variables.
For example:
http://localhost/testmodrewrite.php?id=2&page=2 shows the following: "You are looking at test number 2, page 2.".
http://localhost/testmodrewrite/2/2/ shows the following: "You are looking at test number , page ." (No numbers.)
Here's the PHP code I am using:
PHP Code:
<?php
print ("You are looking at test number " . $_GET["id"] . ", page number " . $_GET["page"] . ".");
?>
And if it helps, here's the lines in my httpd.conf file:
Code:
<Directory "C:\wwwroot\htdocs">
RewriteRule ^testmodrewrite/(.*)/(.*)$ /testmodrewrite.php?id=$1&page=$2
</Directory>
Yes, I've got RewriteEngine On set and I have uncommented the mod loading lines.
Any help appreciated 
|