.htaccess file to access page without .php exstension


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



Copy this code and paste it in your HTML
  1. RewriteEngine On
  2. RewriteBase /
  3. RewriteRule ^()$ index.php [NC,L]
  4. Rewritecond %{REQUEST_URI} !(^/?.*\..*$) [NC]
  5. RewriteRule (.*)$ $1.php [NC]
  6.  
  7. ErrorDocument 404 /index

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.