URL Rewriting

Discussion in 'Programming' started by mintoj, Sep 24, 2008.

  1. #1
    Anyone know how to do url rewriting.

    I need to convert querystrings like: page.php?p=1 into more friendly page.php/p/1

    Thanks
     
    mintoj, Sep 24, 2008 IP
  2. doro

    doro Active Member

    Messages:
    306
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    put the following in your .htaccess file..
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^page.php/p/(.*) /page.php?p=$1
    Code (markup):

    But better something like
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^some-text-(.*)\.htm$ /page.php?p=$1
    Code (markup):
    some-text-2.htm will be converted to /page.php?p=2

    I didn't test, but it should work. It would be easier if you read an manual, url rewriting is pretty important.
     
    doro, Sep 24, 2008 IP
  3. NetworkTown.Net

    NetworkTown.Net Well-Known Member

    Messages:
    2,022
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    165
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    Hi, if you still need someone i can do this for you, PM me.

    Thanks
     
    NetworkTown.Net, Sep 24, 2008 IP
  4. mintoj

    mintoj Peon

    Messages:
    317
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    I'm still looking for help with this.

    J
     
    mintoj, Sep 25, 2008 IP
  5. logylaps

    logylaps Active Member

    Messages:
    761
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    85
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    logylaps, Sep 25, 2008 IP