Dynamic pages which appear static

Discussion in 'PHP' started by dpak, Oct 20, 2005.

  1. #1
    I'm just wondering if anyone has any way to dynamic pages look like static pages in PHP? Is this something that has to be done at the server level or is there a script trick that can be used?

    Example:
    My current pages are software.php?id=##

    Where ## is the id number of that product, but I'd rather have it be...
    software##.php where ## is the ID number, but I don't want to have to create an actual file for each script.

    Anyone have any tips on how I might do this? or something similar?
     
    dpak, Oct 20, 2005 IP
  2. cgo85

    cgo85 Peon

    Messages:
    380
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    no sure if I understand the question but you should check the Apahce-->.htaccess section for URL mod_rewrite
     
    cgo85, Oct 20, 2005 IP
  3. king_cobra

    king_cobra Peon

    Messages:
    373
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #3
    this is done by mod_rewriting. nintendo (member here) is excellent in mod rewrite rules. also with in the script u shd make the links created like the way u need.
     
    king_cobra, Oct 20, 2005 IP
  4. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #4
    frankm, Oct 20, 2005 IP
  5. sarahk

    sarahk iTamer Staff

    Messages:
    28,840
    Likes Received:
    4,542
    Best Answers:
    123
    Trophy Points:
    665
    #5
    You'll find it's actually quite easy

    My rewrite hint: always specify the RewriteBase.
     
    sarahk, Oct 21, 2005 IP
  6. dpak

    dpak Peon

    Messages:
    111
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Perfect. That looks like it's exactly what I'm looking for.

    Thanks everyone!
     
    dpak, Oct 21, 2005 IP