alsakib945

.htaccess rules

Dec 12th, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. # Protect the htaccess file
  2. <Files .htaccess>
  3. Order Allow,Deny
  4. Allow from all
  5. </Files>
  6.  
  7. # Protect the config file
  8. <Files config.php>
  9. Order Allow,Deny
  10. Allow from all
  11. </Files>
  12.  
  13. # Protect the security file
  14. <Files project-security.php>
  15. Order Allow,Deny
  16. Allow from all
  17. </Files>
  18.  
  19. RewriteEngine On
  20. RewriteCond %{REQUEST_FILENAME} !-d
  21. RewriteCond %{REQUEST_FILENAME} !-f
  22. RewriteRule ^([^\.]+)$ $1.php [NC,L]
Add Comment
Please, Sign In to add comment