Remove .php from URL


/ Published in: Apache
Save to your folder(s)

.htaccess


Copy this code and paste it in your HTML
  1. RewriteEngine On
  2. RewriteCond %{SCRIPT_FILENAME} !-d
  3. RewriteRule ^([^\.]+)$ $1.php [NC,L]

URL: http://css-tricks.com/snippets/htaccess/remove-file-extention-from-urls/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.