Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typo

Package Overview
Dependencies
Maintainers
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typo

  • 6.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
5
Created
Source

To fully profit from Typo static caching capabilities, you need to add the following rewrite rules to either your .htaccess or your virtualhost after declaring the document root.

== Rewrite Rules For Apache

=== If Typo is installed at your URL root.

RewriteEngine On

RewriteCond %{DOCUMENT_ROOT}/cache/index.html -f RewriteRule ^/$ /cache/index.html [PT]

RewriteCond %{DOCUMENT_ROOT}/cache/%{REQUEST_FILENAME} -f RewriteRule ^/(.*)$ /cache/$1 [PT]

RewriteCond %{DOCUMENT_ROOT}/cache/%{REQUEST_FILENAME}.html -f RewriteRule ^/(.*)$ /cache/$1.html [PT]

=== If Typo is installed in a sub-URL, e.g., /blog:

Note that 'blog' appears twice in the rewritten URL.

RewriteEngine On

RewriteCond %{DOCUMENT_ROOT}/blog/cache/blog.html -f RewriteRule ^/blog$ /blog/cache/blog.html [PT]

RewriteCond %{DOCUMENT_ROOT}/blog/cache/%{REQUEST_FILENAME} -f RewriteRule ^/blog/(.*)$ /blog/cache/blog/$1 [PT]

RewriteCond %{DOCUMENT_ROOT}/blog/cache/%{REQUEST_FILENAME}.html -f RewriteRule ^/blog/(.*)$ /blog/cache/blog/$1.html [PT]

== Rewrite Rules For Nginx

if (-f $request_filename) { break; }

if (-f $document_root/cache/index.html) { rewrite ^/$ /cache/index.html break; }

if (-f $document_root/cache$uri) { rewrite (.*) /cache$1 break; break; }

if (-f $document_root/cache$uri.html) { rewrite (.*) /cache$1.html break; break; }

FAQs

Package last updated on 17 Mar 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc