Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service.prerender.io giving 503 service unavailable #4

Open
JulianH99 opened this issue May 12, 2021 · 0 comments
Open

service.prerender.io giving 503 service unavailable #4

JulianH99 opened this issue May 12, 2021 · 0 comments

Comments

@JulianH99
Copy link

JulianH99 commented May 12, 2021

I've been testing prerender from curl and other social media platforms. Curl gives a 503 error. This is my .htaccess

<IfModule mod_headers.c>
    RequestHeader set X-Prerender-Token "MY_TOKEN"
    RequestHeader set X-Prerender-Version "[email protected]"
</IfModule>

<IfModule mod_rewrite.c>
        RewriteEngine On

        # -- REDIRECTION to https (optional):
        # If you need this, uncomment the next two commands
        # RewriteCond %{HTTPS} !on
        # RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
        # --

        <IfModule mod_proxy_http.c>
        RewriteCond %{HTTP_USER_AGENT} googlebot|bingbot|yandex|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\$
        RewriteCond %{QUERY_STRING} _escaped_fragment_
        RewriteCond %{REQUEST_URI} ^(?!.*?(\.js|\.woff2|\.json|\.css|\.xml|\.less|\.png|\.jpg|\.jpeg|\.gif|\.pdf|\.doc|\.txt|\.ico|\.rss|\.zip|\.mp3$

        RewriteRule ^(index\.html|index\.php)?(.*) https://service.prerender.io/https://mydomain.co/$2 [P,END]
        </IfModule>


        RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
        RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d

        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^(.*) index.html [NC,L]
</IfModule>

Executing curl -A "twitterbot" https://mydomain.com gives me the next response:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Unavailable</title>
</head><body>
<h1>Service Unavailable</h1>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant