phpMyFAQ/www.phpmyfaq.de/master/app/.htaccess
# www.phpmyfaq.de Apache configs, based on
# https://github.com/h5bp/server-configs-apache
# ######################################################################
# # CROSS-ORIGIN #
# ######################################################################
# ----------------------------------------------------------------------
# | Cross-origin requests |
# ----------------------------------------------------------------------
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
# ----------------------------------------------------------------------
# | Cross-origin images |
# ----------------------------------------------------------------------
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
<FilesMatch ".(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
SetEnvIf Origin ":" IS_CORS
Header set Access-Control-Allow-Origin "*" env=IS_CORS
</FilesMatch>
</IfModule>
</IfModule>
# ----------------------------------------------------------------------
# | Cross-origin web fonts |
# ----------------------------------------------------------------------
<IfModule mod_headers.c>
<FilesMatch ".(eot|otf|tt[cf]|woff2?)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
# ######################################################################
# # ERRORS #
# ######################################################################
# ----------------------------------------------------------------------
# | Custom error messages/pages |
# ----------------------------------------------------------------------
ErrorDocument 404 /errors/404.html
# ----------------------------------------------------------------------
# | Error prevention |
# ----------------------------------------------------------------------
Options -MultiViews
# ######################################################################
# # INTERNET EXPLORER #
# ######################################################################
# ----------------------------------------------------------------------
# | Document modes |
# ----------------------------------------------------------------------
# Force Internet Explorer 8/9/10 to render pages in the highest mode
# available in the various cases when it may not.
#
# https://hsivonen.fi/doctype/#ie8
#
# (!) Starting with Internet Explorer 11, document modes are deprecated.
# If your business still relies on older web apps and services that were
# designed for older versions of Internet Explorer, you might want to
# consider enabling `Enterprise Mode` throughout your company.
#
# http://msdn.microsoft.com/en-us/library/ie/bg182625.aspx#docmode
# http://blogs.msdn.com/b/ie/archive/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11.aspx
<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=edge"
<FilesMatch ".(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
Header unset X-UA-Compatible
</FilesMatch>
</IfModule>
# ----------------------------------------------------------------------
# | Iframes cookies |
# ----------------------------------------------------------------------
# Allow cookies to be set from iframes in Internet Explorer.
#
# http://msdn.microsoft.com/en-us/library/ms537343.aspx
# http://www.w3.org/TR/2000/CR-P3P-20001215/
# <IfModule mod_headers.c>
# Header set P3P "policyref="/w3c/p3p.xml", CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT""
# </IfModule>
# ######################################################################
# # MEDIA TYPES AND CHARACTER ENCODINGS #
# ######################################################################
# ----------------------------------------------------------------------
# | Media types |
# ----------------------------------------------------------------------
# Serve resources with the proper media types (f.k.a. MIME types).
#
# https://www.iana.org/assignments/media-types/media-types.xhtml
# https://httpd.apache.org/docs/current/mod/mod_mime.html#addtype
<IfModule mod_mime.c>
# Data interchange
AddType application/json json map topojson
AddType application/ld+json jsonld
AddType application/vnd.geo+json geojson
AddType application/xml atom rdf rss xml
# JavaScript
# Normalize to standard type.
# https://tools.ietf.org/html/rfc4329#section-7.2
AddType application/javascript js
# Manifest files
# If you are providing a web application manifest file (see
# the specification: https://w3c.github.io/manifest/), it is
# recommended that you serve it with the `application/manifest+json`
# media type.
#
# Because the web application manifest file doesn't have its
# own unique file extension, you can set its media type either
# by matching:
#
# 1) the exact location of the file (this can be done using a
# directive such as `<Location>`, but it will NOT work in
# the `.htaccess` file, so you will have to do it in the main
# server configuration file or inside of a `<VirtualHost>`
# container)
#
# e.g.:
#
# <Location "/.well-known/manifest.json">
# AddType application/manifest+json json
# </Location>
#
# 2) the filename (this can be problematic as you will need to
# ensure that you don't have any other file with the same name
# as the one you gave to your web application manifest file)
#
# e.g.:
#
# <Files "manifest.json">
# AddType application/manifest+json json
# </Files>
AddType application/x-web-app-manifest+json webapp
AddType text/cache-manifest appcache manifest
# Media files
AddType audio/mp4 f4a f4b m4a
AddType audio/ogg oga ogg opus
AddType image/bmp bmp
AddType image/webp webp
AddType video/mp4 f4v f4p m4v mp4
AddType video/ogg ogv
AddType video/webm webm
AddType video/x-flv flv
AddType image/svg+xml svg svgz
# Serving `.ico` image files with a different media type
# prevents Internet Explorer from displaying then as images:
# https://github.com/h5bp/html5-boilerplate/commit/37b5fec090d00f38de64b591bcddcb205aadf8ee
AddType image/x-icon cur ico
# Web fonts
AddType application/font-woff woff
AddType application/font-woff2 woff2
AddType application/vnd.ms-fontobject eot
# Browsers usually ignore the font media types and simply sniff
# the bytes to figure out the font type.
# https://mimesniff.spec.whatwg.org/#matching-a-font-type-pattern
#
# However, Blink and WebKit based browsers will show a warning
# in the console if the following font types are served with any
# other media types.
AddType application/x-font-ttf ttc ttf
AddType font/opentype otf
# Other
AddType application/octet-stream safariextz
AddType application/x-bb-appworld bbaw
AddType application/x-chrome-extension crx
AddType application/x-opera-extension oex
AddType application/x-xpinstall xpi
AddType text/vcard vcard vcf
AddType text/vnd.rim.location.xloc xloc
AddType text/vtt vtt
AddType text/x-component htc
</IfModule>
# ----------------------------------------------------------------------
# | Character encodings |
# ----------------------------------------------------------------------
# Serve all resources labeled as `text/html` or `text/plain`
# with the media type `charset` parameter set to `UTF-8`.
#
# https://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset
AddDefaultCharset utf-8
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Serve the following file types with the media type `charset`
# parameter set to `UTF-8`.
#
# https://httpd.apache.org/docs/current/mod/mod_mime.html#addcharset
<IfModule mod_mime.c>
AddCharset utf-8 .atom
.bbaw
.css
.geojson
.js
.json
.jsonld
.rdf
.rss
.topojson
.vtt
.webapp
.xloc
.xml
</IfModule>
# ######################################################################
# # REWRITES #
# ######################################################################
# ----------------------------------------------------------------------
# | Rewrite engine |
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
</IfModule>
# ----------------------------------------------------------------------
# | Forcing the `www.` at the beginning of URLs |
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteCond %{HTTP_HOST} ^phpmyfaq.de$
RewriteRule (.*) http://www.phpmyfaq.de/$1 [R=301,L]
</IfModule>
# ######################################################################
# # SECURITY #
# ######################################################################
# ----------------------------------------------------------------------
# | Clickjacking |
# ----------------------------------------------------------------------
<IfModule mod_headers.c>
Header set X-Frame-Options "DENY"
<FilesMatch ".(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
Header unset X-Frame-Options
</FilesMatch>
</IfModule>
# ----------------------------------------------------------------------
# | File access |
# ----------------------------------------------------------------------
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} "!(^|/).well-known/([^./]+./?)+$" [NC]
RewriteCond %{SCRIPT_FILENAME} -d [OR]
RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule "(^|/)." - [F]
</IfModule>
<FilesMatch "(^#.*#|.(bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$">
# Apache < 2.3
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
Satisfy All
</IfModule>
# Apache ≥ 2.3
#<IfModule mod_authz_core.c>
# Require all denied
#</IfModule>
</FilesMatch>
# ----------------------------------------------------------------------
# | Reducing MIME type security risks |
# ----------------------------------------------------------------------
<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
</IfModule>
# ######################################################################
# # WEB PERFORMANCE #
# ######################################################################
# ----------------------------------------------------------------------
# | Compression |
# ----------------------------------------------------------------------
<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)s*,?s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE "application/atom+xml"
"application/javascript"
"application/json"
"application/ld+json"
"application/manifest+json"
"application/rdf+xml"
"application/rss+xml"
"application/schema+json"
"application/vnd.geo+json"
"application/vnd.ms-fontobject"
"application/x-font-ttf"
"application/x-javascript"
"application/x-web-app-manifest+json"
"application/xhtml+xml"
"application/xml"
"font/eot"
"font/opentype"
"image/bmp"
"image/svg+xml"
"image/vnd.microsoft.icon"
"image/x-icon"
"text/cache-manifest"
"text/css"
"text/html"
"text/javascript"
"text/plain"
"text/vcard"
"text/vnd.rim.location.xloc"
"text/vtt"
"text/x-component"
"text/x-cross-domain-policy"
"text/xml"
</IfModule>
<IfModule mod_mime.c>
AddEncoding gzip svgz
</IfModule>
</IfModule>
# ----------------------------------------------------------------------
# | ETags |
# ----------------------------------------------------------------------
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
FileETag None
# ----------------------------------------------------------------------
# | Expires headers |
# ----------------------------------------------------------------------
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 year"
# Data interchange
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType application/rdf+xml "access plus 1 hour"
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/ld+json "access plus 0 seconds"
ExpiresByType application/schema+json "access plus 0 seconds"
ExpiresByType application/vnd.geo+json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
# Favicon (cannot be renamed!) and cursor images
ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 week"
# HTML
ExpiresByType text/html "access plus 0 seconds"
# JavaScript
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType application/x-javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
# Manifest files
ExpiresByType application/manifest+json "access plus 1 year"
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Media files
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType image/bmp "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
# Web fonts
# Embedded OpenType (EOT)
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
ExpiresByType font/eot "access plus 1 month"
# OpenType
ExpiresByType font/opentype "access plus 1 month"
# TrueType
ExpiresByType application/x-font-ttf "access plus 1 month"
# Web Open Font Format (WOFF) 1.0
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType font/woff "access plus 1 month"
# Web Open Font Format (WOFF) 2.0
ExpiresByType application/font-woff2 "access plus 1 month"
# Other
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
</IfModule>
# ----------------------------------------------------------------------
# | Old www.phpmyfaq.de rewrites |
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
# API
RewriteRule json/version.php http://api.phpmyfaq.de/versions [R=301,L]
RewriteRule api/version http://api.phpmyfaq.de/versions [R=301,L]
RewriteRule api/verify/(.+)$ http://api.phpmyfaq.de/verify/$1 [L,QSA]
# Downloads
RewriteRule download/phpMyFAQ-latest.zip http://download.phpmyfaq.de/phpMyFAQ-latest.zip [R=301,L]
RewriteRule download/phpMyFAQ-latest.tar.gz http://download.phpmyfaq.de/phpMyFAQ-latest.tar.gz [R=301,L]
RewriteRule download/phpMyFAQ-development.zip http://download.phpmyfaq.de/phpMyFAQ-development.zip [R=301,L]
RewriteRule download/phpMyFAQ-development.tar.gz http://download.phpmyfaq.de/phpMyFAQ-development.tar.gz [R=301,L]
RewriteRule download/phpMyFAQ-(.+).zip$ http://download.phpmyfaq.de/phpMyFAQ-$1.zip [R=301,L]
RewriteRule download/phpMyFAQ-(.+).tar.gz$ http://download.phpmyfaq.de/phpMyFAQ-$1.tar.gz [R=301,L]
RewriteRule download/phpmyfaq-(.+).tar.gz.md5$ http://download.phpmyfaq.de/phpMyFAQ-$1.tar.gz.md5 [R=301,L]
RewriteRule download/phpmyfaq-(.+)&version=(.+) http://download.phpmyfaq.de/phpmyfaq-$1&version=$2 [R=301,L]
# Documentation
RewriteRule documentation.([0-9]+).([0-9]+).en.php$ /docs/$1.$2 [R=301,L]
# News
RewriteRule news/([0-9]+).php$ /news/$1 [R=301,L]
RewriteRule ([0-9]+).php$ /news/$1 [R=301,L]
# Security Advisories
RewriteRule news/advisory_([0-9]+)-([0-9]+)-([0-9]+).php$ /security/advisory-$1-$2-$3 [R=301,L]
RewriteRule security/advisory_([0-9]+)-([0-9]+)-([0-9]+).php$ /security/advisory-$1-$2-$3 [R=301,L]
RewriteRule advisory_([0-9]+)-([0-9]+)-([0-9]+).php$ /security/advisory-$1-$2-$3 [R=301,L]
RewriteRule advisoriesadvisory-([0-9]+)-([0-9]+)-([0-9]+) /security/advisory-$1-$2-$3 [R=301,L]
</IfModule>
<IfModule mod_alias.c>
# Permanent 301 redirects
RedirectPermanent /10years.php /10years
RedirectPermanent /bugtraq.php https://github.com/thorsten/phpMyFAQ/issues
RedirectPermanent /changelog.php /changelog
RedirectPermanent /codenames.php /docs/codenames
RedirectPermanent /docs/codenames.php /docs/codenames
RedirectPermanent /codingguidelines.php /docs/standards
RedirectPermanent /docs/standards.php /docs/standards
RedirectPermanent /contributing.php /contribute
RedirectPermanent /contribute.php /contribute
RedirectPermanent /danke.php /thankyou
RedirectPermanent /demo http://demo.phpmyfaq.de
RedirectPermanent /download/ /download
RedirectPermanent /development.php /development
RedirectPermanent /dokumentation.php /documentation
RedirectPermanent /documentation.php /documentation
RedirectPermanent /dokumentation.1.0.de.php /docs
RedirectPermanent /docs/dokumentation.1.0.de.php /docs
RedirectPermanent /dokumentation.1.1.de.php /docs
RedirectPermanent /docs/dokumentation.1.1.de.php /docs
RedirectPermanent /dokumentation.1.2.php /docs
RedirectPermanent /dokumentation.1.2.de.php /docs
RedirectPermanent /docs/dokumentation.1.2.de.php /docs
RedirectPermanent /dokumentation.1.3.cz.php /docs
RedirectPermanent /dokumentation.1.3.de.php /docs
RedirectPermanent /docs/dokumentation.1.3.cz.php /docs
RedirectPermanent /docs/dokumentation.1.3.de.php /docs
RedirectPermanent /dokumentation.1.3.en.php /docs
RedirectPermanent /docs/dokumentation.1.3.en.php /docs
RedirectPermanent /dokumentation.1.3.pl.php /docs
RedirectPermanent /docs/dokumentation.1.3.pl.php /docs
RedirectPermanent /dokumentation.1.4.en.php /docs
RedirectPermanent /docs/dokumentation.1.4.en.php /docs
RedirectPermanent /dokumentation.1.5.en.php /docs
RedirectPermanent /docs/dokumentation.1.5.en.php /docs
RedirectPermanent /dokumentation.1.6.en.php /docs
RedirectPermanent /docs/dokumentation.1.6.en.php /docs
RedirectPermanent /dokumentation.1.6.de.php /docs
RedirectPermanent /docs/dokumentation.1.6.de.php /docs
RedirectPermanent /dokumentation.2.0.en.php /docs/2.0
RedirectPermanent /docs/dokumentation.2.0.en.php /docs/2.0
RedirectPermanent /documentation.2.5.en.php /docs/2.5
RedirectPermanent /docs/documentation.2.5.en.php /docs/2.5
RedirectPermanent /documentation.2.6.en.php /docs/2.6
RedirectPermanent /docs/documentation.2.6.en.php /docs/2.6
RedirectPermanent /documentation.2.7.en.php /docs/2.7
RedirectPermanent /docs/documentation.2.7.en.php /docs/2.8
RedirectPermanent /docs/documentation.2.8.en.php /docs/2.8
RedirectPermanent /docs/documentation.de.html /documentation
RedirectPermanent /documentation.php /documentation
RedirectPermanent /docs/documentation.de.php /documentation
RedirectPermanent /docs/lizenz.html https://raw.github.com/thorsten/phpMyFAQ/master/LICENSE
RedirectPermanent /docs/lizenz.php https://raw.github.com/thorsten/phpMyFAQ/master/LICENSE
RedirectPermanent /docs/phpmyfaq.txt /docs
RedirectPermanent /donations.php /donations
RedirectPermanent /download.php /download
RedirectPermanent /download.PHP /download
RedirectPermanent /download_old.php /old-downloads
RedirectPermanent /faq http://faq.phpmyfaq.de
RedirectPermanent /features.php /features
RedirectPermanent /forum http://forum.phpmyfaq.de
RedirectPermanent /hosting.php /hosting
RedirectPermanent /impressum.php /imprint
RedirectPermanent /imprint.php /imprint
RedirectPermanent /index.php /
RedirectPermanent /lifecycle.php /
RedirectPermanent /license.php https://raw.github.com/thorsten/phpMyFAQ/master/LICENSE
RedirectPermanent /lizenz.php https://raw.github.com/thorsten/phpMyFAQ/master/LICENSE
RedirectPermanent /logo.php /
RedirectPermanent /mailingliste.php http://forum.phpmyfaq.de
RedirectPermanent /news/bugtraq.php https://github.com/thorsten/phpMyFAQ/issues
RedirectPermanent /news/changelog.php /changelog
RedirectPermanent /news/documentation.php /documentation
RedirectPermanent /news/dokumentation.php /documentation
RedirectPermanent /news/documentation.1.3.php /documentation
RedirectPermanent /news/dokumentation.1.3.php /documentation
RedirectPermanent /news/dokumentation.1.3.pl.php /documentation
RedirectPermanent /documentation.php /documentation
RedirectPermanent /referenzen.php /references
RedirectPermanent /references.php /references
RedirectPermanent /requirements.php /requirements
RedirectPermanent /roadmap.php /
RedirectPermanent /security.php /advisories
RedirectPermanent /standards.php /docs/standards
RedirectPermanent /support.php /support
RedirectPermanent /team.php /imprint
RedirectPermanent /terms.php /terms
RedirectPermanent /themes.php /themes
RedirectPermanent /imprint.php /imprint
RedirectPermanent /translation.php /translations
RedirectPermanent /xml/faqschema.xsd /
RedirectPermanent /xml/version.php http://api.phpmyfaq.de/versions
</IfModule>
# ----------------------------------------------------------------------
# | Redirects www.phpmyfaq.de/file.html to www.phpmyfaq.de/file |
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html [L]
</IfModule>
On Github License
Files