pijey/feedes/master/public/.htaccess - Htaccess File

pijey/feedes/master/public/.htaccess

# FallbackResource /index.html

# <IfModule mod_headers.c>
#     RequestHeader set X-Prerender-Token "9IwrSjeGTabOzJI8oHrI"
# </IfModule>
 
  Options +FollowSymlinks
  RewriteEngine On

    RewriteCond %{HTTP_HOST} ^www.feedes.fr$
    RewriteRule ^(.*) http://feedes.fr/$1 [QSA,L,R=301]
# If requested resource exists as a file or directory
  # (REQUEST_FILENAME is only relative in virtualhost context, so not usable)
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
    # Go to it as is
    RewriteRule ^ - [L]

  # If non existent
    # If path ends with / and is not just a single /, redirect to without the trailing /
      RewriteCond %{REQUEST_URI} ^.*/$
      RewriteCond %{REQUEST_URI} !^/$
      RewriteRule ^(.*)/$ $1 [R,QSA,L]      

  # Handle Prerender.io
    RequestHeader set X-Prerender-Token "9IwrSjeGTabOzJI8oHrI"

    RewriteCond %{HTTP_USER_AGENT} baiduspider|site-analyzer|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora link preview|showyoubot|outbrain|pinterest [NC,OR]
    RewriteCond %{QUERY_STRING} _escaped_fragment_

    # Proxy the request
    RewriteRule ^(.*)$ http://service.prerender.io/http://%{HTTP_HOST}$1 [P,L]

  # If non existent
    # Accept everything on index.html
    RewriteRule ^ /index.html

    

RewriteEngine on

On Github License

Files

Download PDF of Htaccess file
DOCUMENT_ROOT, HTTP_HOST, HTTP_USER_AGENT, QUERY_STRING, REQUEST_FILENAME, REQUEST_URI

Comments

Apache