-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.htaccess
More file actions
24 lines (19 loc) · 747 Bytes
/
.htaccess
File metadata and controls
24 lines (19 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Activar la reescritura de URLs
RewriteEngine On
# Redirige las solicitudes a la carpeta 'public' para archivos estáticos
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(css|js|images|fonts)/(.+\.(css|js|png|jpg|gif|ico|svg|woff|woff2|ttf|eot))$ public/$1/$2 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.js [NC,L]
# Redirige todas las demás solicitudes al archivo index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
# Configura el acceso a los archivos .ht* para denegar el acceso
<Files ~ "^.*\.([Hh][Tt][Aa])">
Order allow,deny
Deny from all
Satisfy all
</Files>