Redirects and custom headers for your sites
Redirecciones y encabezados propios para tus sitios
Sites published on OrtSoft Hosting now read two optional files: _redirects and _headers. They use the same simple format many developers already know, so you can move an existing site without rewriting its rules.
_redirects
/old-page /new-page /blog/* /posts/:splat 302 /app/* /index.html 200
Each line has the old path, the new one and an optional status code. 200 shows another page without changing the address, which is what single-page apps need. Rewrites always stay inside your own site.
_headers
/assets/* Cache-Control: public, max-age=31536000
Write a path and, under it, the headers to add. Headers that could break your pages or affect other sites are ignored.
Both files go next to your index.html and take effect on your next deployment. The Help Center has every option.
Los sitios publicados en OrtSoft Hosting ahora leen dos archivos opcionales: _redirects y _headers. Usan el mismo formato sencillo que muchos desarrolladores ya conocen, así puedes mover un sitio existente sin reescribir sus reglas.
_redirects
/pagina-vieja /pagina-nueva /blog/* /posts/:splat 302 /app/* /index.html 200
Cada línea lleva la ruta vieja, la nueva y un código opcional. 200 muestra otra página sin cambiar la dirección, que es lo que necesitan las apps de una sola página. Las reescrituras siempre se quedan dentro de tu propio sitio.
_headers
/assets/* Cache-Control: public, max-age=31536000
Escribe una ruta y, debajo, los encabezados que quieres agregar. Se ignoran los que podrían romper tus páginas o afectar otros sitios.
Los dos archivos van junto a tu index.html y se aplican en tu siguiente despliegue. El Centro de ayuda tiene todas las opciones.
Introducing OrtSoft
Presentamos OrtSoft