slub/slub-typo3-dist/master/.htaccess - Htaccess File

slub/slub-typo3-dist/master/.htaccess

# Asset Caching
<FilesMatch '.(js|css|jpg|jpeg|png|svg|woff)$'>
  <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault "access plus 30 days"
  </IfModule>
  FileETag MTime Size
</FilesMatch>

<IfModule mod_rewrite.c>
  RewriteEngine On

  # Version Numbered Filenames
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.+).(d+).(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]

  # Basic security checks
  RewriteRule ^fileadmin/(.*/)?_recycler_/ - [F]
  RewriteRule ^fileadmin/templates/.*(.txt|.ts)$ - [F]
  RewriteRule ^typo3conf/ext/[^/]+/Resources/Private/ - [F]

  # Stop rewrite processing, if we are in the typo3/ directory.
  RewriteRule ^(typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon.ico) - [L]

  # If the file/symlink/directory does not exist => Redirect to index.php.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteCond %{REQUEST_URI} !/server-status
  RewriteRule .* /index.php [L]

  # JSON-LD
  RewriteCond %{HTTP_ACCEPT} text/json
  RewriteCond %{REQUEST_URI} ^/id/(.*)$
  RewriteRule id/(.*)$ https://katalogbeta.slub-dresden.de/id/$1.json [R=303,L]

  RewriteCond %{HTTP_ACCEPT} application/ld+json
  RewriteCond %{REQUEST_URI} ^/id/(.*)$
  RewriteRule id/(.*)$ https://katalogbeta.slub-dresden.de/id/$1.json [R=303,L]

  RewriteCond %{REQUEST_URI} ^(.*).json$
  RewriteRule id/(.*).json$ http://%{HTTP_HOST}%1/?type=1369315139&tx_find_find%5Bformat%5D=data&tx_find_find%5Bdata-format%5D=json-ld [P]

</IfModule>

# gzip compression of all assets
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
</IfModule>

<FilesMatch ".(js|css)$">
  <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault "access plus 7 days"
  </IfModule>
  FileETag MTime Size
</FilesMatch>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, HTTP_ACCEPT, HTTP_HOST, REQUEST_FILENAME, REQUEST_URI

Comments

Apache