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
    New Coder
    Join Date
    Mar 2003
    Location
    USA
    Posts
    99
    Thanks
    24
    Thanked 0 Times in 0 Posts

    Easiest way to remove .php extensions

    How can I use $_SERVER["PATH_INFO"]; to remove .php from my extensions? I don't want to just use mod_rewrite because you can still access urls with .php.

    I want to change from http://www.site.com/page.php to http://www.site.com/page

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,851
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    aedrin's posts at Dynamic <title></title> depending on page may give you an idea on how to setup a system which accepts urls like /?page=home , /?page=about etc. After that, it's just a mod_rewrite technique to change those urls as /home, /about respectively.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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