Results 1 to 2 of 2

Thread: .htaccess : Hiding .php extensions in URL

  1. #1

    .htaccess : Hiding .php extensions in URL


    I was wondering if there is anyway we can hide the .php extension in the URL using .htaccess?
    please help me how can i hide sharre your suggestion. thanks

  2. #2
    Join Date
    Dec 2012
    You need to use the rewrite engine in the .htaccess file, so for example to remove .php from "about.php" you'd write your .htaccess file like this

    RewriteEngine on
    RewriteRule ^about$ about.php
    It uses a regular expression to find "about" and replaces it with about.php when looking for the file.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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