Mode rewrite question

Discussion in 'PHP' started by seo25, Feb 16, 2009.

  1. #1
    Hello,

    I have a site and the url looks like
    http://www.example.com/blog/?p=1
    and i want the url to look like
    http://www.example.com/blog

    how do i mode rewrite it - what is the code and where do i place the code
    please help

    looking fwd to your replies.

    thanks
     
    seo25, Feb 16, 2009 IP
  2. ActiveFrost

    ActiveFrost Notable Member

    Messages:
    2,072
    Likes Received:
    63
    Best Answers:
    3
    Trophy Points:
    245
    #2
    ActiveFrost, Feb 16, 2009 IP
  3. webmoney

    webmoney Well-Known Member

    Messages:
    1,119
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    155
    #3
    You can try also this online .htaccess generator


    In your case this should help:
    Just create file ".htaccess" with content above, upload it to the root of your hosting and than it should work.
    It might be possible that some hosting do not allow mod_rewrite.

    Now when you type: http://www.example.com/blog or http://www.example.com/blog/ than it should work.

    I hope this is the simplest way :)
     
    webmoney, Feb 16, 2009 IP
  4. seo25

    seo25 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks a lot for the replies :) :)
     
    seo25, Feb 16, 2009 IP