Xephon
Dec 29th, 2005, 10:59 PM
Hi.
Today i put on another server a simple blog script i made.
It's using regex to handle urls (with apache as web server)
While at home (private server with apache 1.3.x) the following works but not at the webhost:
RewriteRule ^get/([0-9]+)$ get.php?file=$1
Rewriterule ^get/([0-9]+)/$ get.php?file=$1
the php script issue the following error:
Notice: Undefined index: file in /home/www/[xxx]/www/get.php on line 7
Heres line 7:
$fileid=trim($_GET['file']);
the error appear when the file is called from
http://thesite.com/get/2/
where 2 = file (as the regex read it)
if i try http://thesite.com/get.php?file=2 , the script won't issue the error and the file will be downloaded o_O
Any idea?
Today i put on another server a simple blog script i made.
It's using regex to handle urls (with apache as web server)
While at home (private server with apache 1.3.x) the following works but not at the webhost:
RewriteRule ^get/([0-9]+)$ get.php?file=$1
Rewriterule ^get/([0-9]+)/$ get.php?file=$1
the php script issue the following error:
Notice: Undefined index: file in /home/www/[xxx]/www/get.php on line 7
Heres line 7:
$fileid=trim($_GET['file']);
the error appear when the file is called from
http://thesite.com/get/2/
where 2 = file (as the regex read it)
if i try http://thesite.com/get.php?file=2 , the script won't issue the error and the file will be downloaded o_O
Any idea?