Results 1 to 2 of 2

Thread: Url Rewriting problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2005
    Posts
    4

    Url Rewriting problem

    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:

    Code:
    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?

  2. #2

    Thread Starter
    New Member
    Join Date
    Sep 2005
    Posts
    4

    Re: Url Rewriting problem

    o_O dunno why but changing the rule for

    ^gets/([0-9]+)$ get.php?file=$1
    ^gets/([0-9]+)/$ get.php?file=$1


    worked...

    I guess the server already used /get/ for something

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width