Rewrite URL for SEO friendly URLs

Discussion in 'Apache' started by astretch, Oct 5, 2010.

  1. #1
    I would like to use rewrite rule in order to make my URLs more SEO friendly. I will have a handful of pages so I don't really need any fancy regex.

    For example:

    In the home directory I will have test-page-a.html however I would like to create following URL that will point to test-page-a.html

    www.domain.com/category/sub-category/test-page-a.html

    How can I accomplish that using rewrite rules?

    I know it's a simple idea but most of the 'how to' pages address dynamic pages by using regex expressions.

    Thanks for any help.
     
    astretch, Oct 5, 2010 IP
  2. MrYu

    MrYu Peon

    Messages:
    157
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If it's just a few pages, the easiest is to avoid mod_rewrite and create a few symlinks instead on the filesystem. Just make sure FollowSymlinks is included in the Apache Options for that directory.
     
    MrYu, Oct 12, 2010 IP