SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: GET not working

  1. #1
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    GET not working

    Hello

    Im trying to do a mod_rewrite.

    I currently have a script that relies on the GET value to retrive data from a database.

    however when I do a rewrite, it does not get the results from the database.

    RewriteRule ^(.*)/$ /i/profile.php?id=$1

    All the images also seem to be broken on the rewrite.

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Jay,

    Your mod_rewrite code should provide i/profile.php with the $_GET array with key of id.

    The reason for your images (not to mention js, css, etc., files) is that you're changing the directory level with your redirection. See Missing Support Files in my signature's tutorial for workarounds.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

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