Use mod_rewrite to changing URL?

Discussion in 'Apache' started by SpiderxXx, Jun 9, 2012.

  1. #1
    Hello dear DP users.
    I am really a n00b at mod_rewrite and don't really know how to use it.

    For example if I would like to change rewrite the URL:

    http://domain.com/index.php?page=forum&id=3538
    Code (markup):
    to
    http://domain.com/forum/3538 /*Note this is only an example, I don't really know how the output could be formatted*/
    Code (markup):
    how can I do this with mod_rewrite?


    Also if I would like to change:

    http://domain.com/index.php?page=forums&action=viewtopic&id=86
    Code (markup):
    to
    http://domain.com/forums/action/viewtopic/86 /*Note this is only an example, I don't really know how the output could be formatted*/
    Code (markup):
    How can I use mod_rewrite to make the link look as good as possible?

    Thanks for all kind of replies.
    regards
     
    SpiderxXx, Jun 9, 2012 IP
  2. xradar

    xradar Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try this example below.

     
    xradar, Jun 12, 2012 IP