majkel26

Untitled

Apr 15th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. RewriteEngine On
  2. # If an existing asset or directory is requested go to it as it is
  3. RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
  4. RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
  5. RewriteRule ^ - [L]
  6.  
  7. # If the requested resource doesn't exist, use index.html
  8. RewriteRule ^ /index.html
  9.  
  10. # Change YOUR_TOKEN to your prerender token
  11. # Change http://example.com (at the end of the last RewriteRule) to your website url
  12.  
  13.  
  14. RequestHeader set X-Prerender-Token "vYE8yWmh8ITfXj7OXQCn"
  15.  
  16.  
  17.  
  18. RewriteEngine On
  19.  
  20.  
  21. RewriteCond %{HTTP_USER_AGENT} googlebot|bingbot|yandex|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest|slackbot|vkShare|W3C_Validator [NC,OR]
  22. RewriteCond %{QUERY_STRING} _escaped_fragment_
  23.  
  24. # Only proxy the request to Prerender if it's a request for HTML
  25. RewriteRule ^(?!.*?(\.js|\.css|\.xml|\.less|\.png|\.jpg|\.jpeg|\.gif|\.pdf|\.doc|\.txt|\.ico|\.rss|\.zip|\.mp3|\.rar|\.exe|\.wmv|\.doc|\.avi|\.ppt|\.mpg|\.mpeg|\.tif|\.wav|\.mov|\.psd|\.ai|\.xls|\.mp4|\.m4a|\.swf|\.dat|\.dmg|\.iso|\.flv|\.m4v|\.torrent|\.ttf|\.woff|\.svg))(.*) http://service.prerender.io/http://%{HTTP_HOST}/?_escaped_fragment_=%1 [P,L]
Advertisement
Add Comment
Please, Sign In to add comment