Help me rewrite files (htaccess)

Discussion in 'Apache' started by mastermindsro, Oct 10, 2009.

  1. #1
    Hi,

    I will get straight into my problem.. so
    I have some main sections: Home, Services, Portfolio etc.
    The sections can be found on the following url:
    mywebsite.com/home.php
    mywebsite.com/services.php
    mywebsite.com/portfolio.php

    --

    I want to have some sub-sections for services: Logo Design, Brochure Design etc.
    Here's the trouble..

    I want to keep all the files in the root, that's why I will name those pages like:
    mywebsite.com/logo_design.php
    mywebsite.com/brochure_design.php

    My question is: How can I make (by adding some code to .htaccess in root)

    mywebsite.com/services.php look in browser like mywebsite.com/services
    and
    mywebsite.com/logo_design.php look in browser like "mywebsite.com/services/logo_design"


    THANKS
     
    mastermindsro, Oct 10, 2009 IP
  2. chadsmith

    chadsmith Peon

    Messages:
    82
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This should do it for you.
     
    chadsmith, Oct 11, 2009 IP