Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2007
    Posts
    126
    Thanks
    4
    Thanked 0 Times in 0 Posts

    can't get my head around url rewrite! help!

    Hi, i am struggling to get my head around url rewrite in htaccess

    first up i just want basic pages changing eg:

    about.php => /about
    contact.php => /contact
    services.php => /services

    then i'll want something a little more complex eg:

    portfolio.php => /portfolio
    portfolio.php?cat=web => /portfolio/web
    portfolio.php?web=sitename => /portfolio/web/sitename

  • #2
    Regular Coder
    Join Date
    Jun 2007
    Posts
    126
    Thanks
    4
    Thanked 0 Times in 0 Posts
    i've worked out

    RewriteRule ^contact$ contact.php [L]

    lets /contact open contact.php

    i can still access contact.php, should this be blocked now? have i done it correctly?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •