Re: URL rewriting...anybody done this?
| From: | Ryan A | Date: | Thu, 15 Jan 2004 01:12:03 +0000 |
| Subject: | Re: URL rewriting...anybody done this? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-174602@lists.php.net to get a copy of this message | ||
Hi again,
I did a little pokeing around and installed this on 3 differient
servers....and the results were identical...
so its not the servers fault but something with the directives...
got some interesting results with my testing....
am using this:
echo "Ok,we are in show.php<br>";
if(isset($_GET["id"])){echo "Got \$_GET[id]<br>";}else{echo "No
\$_GET[id]<br>";}
if(isset($_GET["sid"])){echo "Got \$_GET[sid]<br>";}else{echo "No
\$_GET[sid]<br>";}
print_r($_GET);
This is still not working:
http://rizkhan.net/articles/show/2/1
(output is: )
Ok,we are in show.php
No $_GET[id]
No $_GET[sid]
Array ( )
This gives the exact expected results (working)
http://rizkhan.net/articles/show/?sid=1&id=2
(note I dont have to write
show.php)
This gives me screwy results:
http://rizkhan.net/articles/show/?1/2
(output is: )
Ok,we are in show.php
No $_GET[id]
No $_GET[sid]
Array ( [1/2] => )
in case you guys forgot, this is what i entered into my httpd.conf:
<Directory /path/to/directory> #of course i entered the correct path#
Options ExecCGI FollowSymLinks Includes MultiViews
AllowOverride all
</Directory>
This is my htaccess file:
RewriteEngine On
RewriteRule ^show/(.*)/(.*) /show.php?sid=$1&id=$2
incase i forgot to mention it...this "#¤"#¤#" thing is not working.
ANY ideas?
Thanks,
-Ryan