File manager - Edit - /var/www/html/portalHomolog/public/.htaccess
Back
# ============================================================ # DEFESA CONTRA WEBSHELL (independe do mod_rewrite) # Nega execução/serving de qualquer script, liberando só o # front controller (index.php). Herdado pelos subdiretórios, # inclusive o symlink public/storage (uploads). # ============================================================ <FilesMatch "\.(?i:php\d?|phtml|phps|phar|pht|inc|cgi|pl|py|sh)$"> Require all denied </FilesMatch> <Files "index.php"> Require all granted </Files> <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews -Indexes </IfModule> RewriteEngine On # ============================ # PROTEÇÃO CONTRA WEBSHELL # ============================ RewriteRule ^index\.php$ - [L] RewriteRule \.(?i:php\d?|phtml|phps|phar|pht|inc|cgi|pl|py|sh)$ - [F,L] # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # GTFS legado → URLs canônicas (Apache: sem Laravel, sem CORS no 301) RewriteRule ^gtfs/feed\.pb$ /mobiangra/gtfs/feed.pb [L,R=301] RewriteRule ^gtfs/gtfs\.zip$ /mobiangra/gtfs/gtfs.zip [L,R=301] RewriteRule ^mobiangra/feed\.pb$ /mobiangra/gtfs/feed.pb [L,R=301] RewriteRule ^mobiangra/gtfs\.zip$ /mobiangra/gtfs/gtfs.zip [L,R=301] # Feeds GTFS canônicos: entrega estática (mobiangra-assets/gtfs) — sem Laravel, cookies ou CORS RewriteRule ^mobiangra/gtfs/feed\.pb$ mobiangra-assets/gtfs/feed.pb [L] RewriteRule ^mobiangra/gtfs/gtfs\.zip$ mobiangra-assets/gtfs/gtfs.zip [L] # MobiAngra (portal/mapa): Laravel — exceto feeds .pb/.zip servidos acima RewriteCond %{REQUEST_URI} ^/mobiangra(/|$) [NC] RewriteRule ^ index.php [L] # CASE INSENSITIVE - Busca inteligente de arquivos RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteCond %{REQUEST_URI} ^(.+)$ RewriteCond %{DOCUMENT_ROOT}/%1 -f [NC] RewriteRule ^ - [L] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] # Send Requests To Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </IfModule>
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings