- Contactos: nova página no backoffice (fitme3070_info) e 964 201 137 como telefone principal; o telefone secundário só aparece quando existe. - Equipa: título, aptidões/funções e formações; o cartão mostra foto, nome e título e abre um cartão horizontal de detalhe (hover no desktop, toque no telemóvel) sem mexer na grelha. - Mensalidades: cartões editáveis com um destaque, modal de inscrição que guarda o pedido (RGPD + estado + campos reservados para o CRM) e avisa o ginásio por e-mail; lista de pedidos com estados, notas e CSV. - Reviews Google via Places API (New), filtradas por classificação mínima e em cache configurável; página de configuração com pesquisa do Place ID. - Assets com ?v=<mtime>: site/assets é servido com cache imutável de 1 ano. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
2.2 KiB
ApacheConf
49 lines
2.2 KiB
ApacheConf
# Disable directory listing
|
|
Options -Indexes
|
|
|
|
# Block direct HTTP access to sensitive files
|
|
<FilesMatch "^\.(env|env\..*|git.*|htaccess|htpasswd)$">
|
|
Require all denied
|
|
</FilesMatch>
|
|
<FilesMatch "^(composer\.(json|lock)|package(-lock)?\.json|yarn\.lock|\.gitignore|\.gitmodules|README\.md|CLAUDE\.md)$">
|
|
Require all denied
|
|
</FilesMatch>
|
|
<FilesMatch "\.sql$">
|
|
Require all denied
|
|
</FilesMatch>
|
|
|
|
# Belt-and-braces: block any dotfile path component (except /.well-known)
|
|
RewriteEngine On
|
|
RewriteRule "(^|/)\.(?!well-known)" - [F,L]
|
|
|
|
# ── Canonical host: force HTTPS + strip www ───────────────────────────────────
|
|
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
|
|
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
|
|
RewriteCond %{HTTPS} off
|
|
RewriteCond %{HTTP:X-Forwarded-Proto} !https
|
|
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
|
|
|
# ── Let static files and backoffice pass through untouched ─────────────────────
|
|
RewriteRule ^views/ - [L]
|
|
RewriteRule ^uploads/ - [L]
|
|
RewriteRule ^site/assets/ - [L]
|
|
RewriteRule ^assets/ - [L]
|
|
|
|
# ── Friendly URLs ─────────────────────────────────────────────────────────────
|
|
RewriteRule ^home/?$ site/index.php [L]
|
|
RewriteRule ^home/equipa/?$ site/equipa.php [L,QSA]
|
|
RewriteRule ^home/modalidades/?$ site/modalidades.php [L,QSA]
|
|
RewriteRule ^home/horario/?$ site/horario.php [L,QSA]
|
|
RewriteRule ^home/contactos/?$ site/contactos.php [L,QSA]
|
|
RewriteRule ^home/agendar/?$ site/agendar.php [L,QSA]
|
|
RewriteRule ^home/inscricao/?$ site/inscricao.php [L,QSA]
|
|
RewriteRule ^home/crossfit/?$ site/crossfit.php [L,QSA]
|
|
RewriteRule ^home/privacidade/?$ site/privacidade.php [L,QSA]
|
|
RewriteRule ^evento/([a-zA-Z0-9-]+)/?$ site/evento.php?slug=$1 [L,QSA]
|
|
|
|
# Pass the Authorization header through to PHP
|
|
RewriteCond %{HTTP:Authorization} .
|
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
|
|
|
DirectoryIndex index.php
|