PHP Classes

File: backend-auth/.htaccess

Recommend this page to a friend!
  Classes of Rodrigo Faustino   Livraria   backend-auth/.htaccess   Download  
File: backend-auth/.htaccess
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Livraria
Manage a bookstore using micro-services
Author: By
Last change:
Date: 2 months ago
Size: 491 bytes
 

Contents

Class file image Download
# Proteger o arquivo .env <FilesMatch "^\.env"> Require all denied </FilesMatch> # Reescrever URLs para remover a extensão .php RewriteEngine On # Reescrever URLs que terminam com / para o arquivo .php correspondente RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ $1.php [L] # Opcional: redirecionar URLs com extensão .php para a versão sem extensão RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC] RewriteRule ^ %1 [R=301,L]