How to get ' www.domain.com/my-value' with htaccess?

Discussion in 'Apache' started by webmaster365, May 31, 2010.

  1. #1
    How to get ' www.domain.com/my-value' with htaccess?
    I want to create few pages but my URL should like this below

    mydomain.com/apple

    Suppose I am having a page on apple so the URL look like above.

    Thanks in advance.
     
    webmaster365, May 31, 2010 IP
  2. rajamanickam.a

    rajamanickam.a Well-Known Member

    Messages:
    636
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    158
    Digital Goods:
    2
    #2
    I too need answer for this question.
    I have tried RewriteRule ^(.*)$ test.php?id=$1 [L]

    But it didn't work.
     
    rajamanickam.a, Jun 8, 2010 IP
  3. rajamanickam.a

    rajamanickam.a Well-Known Member

    Messages:
    636
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    158
    Digital Goods:
    2
    #3
    Finally I got the solution.
    Below rule did the work.
    RewriteRule ^([a-z]+)$ test.php?id=$1 [L]
     
    rajamanickam.a, Jun 8, 2010 IP