How to make seo friendly url

Discussion in 'PHP' started by markup, Jun 17, 2012.

  1. #1
    markup, Jun 17, 2012 IP
  2. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #2
    Create a .htaccess with a Rewrite rule...

    RewriteEngine on
    RewriteRule ^mysite/best_php_example\.html$ /mysite/post.php?id=2 [L]
     
    NetStar, Jun 17, 2012 IP
  3. CML-Mike

    CML-Mike Greenhorn

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    Take a look at this yourhtmlsource[dot]com/sitemanagement/urlrewriting.html
    It'll help you get started.
     
    CML-Mike, Jun 17, 2012 IP
  4. webshore88

    webshore88 Well-Known Member

    Messages:
    131
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    123
    #4
    webshore88, Jun 18, 2012 IP
  5. Custom IDX/MLS

    Custom IDX/MLS Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Make sure the Rewrite module is enabled in XAMPP. Sometimes it's disabled by default. Then go along the lines of what NetStar wrote.
     
    Custom IDX/MLS, Jun 19, 2012 IP
  6. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    #6
    just to point out that having .html is not seo friendly. In fact W3.org say you should leave file extensions out of the url.
    (http://www.w3.org/Provider/Style/URI see What to leave out Section)
     
    stephan2307, Jun 20, 2012 IP