Answer the question
In order to leave comments, you need to log in
404 error in production?
Help me solve the problem of following url
Render works on local, but in production - error File not found 404
errors in the console:
GEThttps://annaisupova.com/apologise/
[HTTP/2 404 Not Found 992ms]
HTML document does not contain declaration character encodings. If the document contains characters that are not in the US-ASCII range, some browser configurations will display garbled text in the document. The character encoding of the page must be declared in the document or in the transfer protocol.
#urls.py
from design import views
urlpatterns = [
...
url(r'apologise/$', views.under_reconstruction, name='apologise-url'),
]
#design.views.py
def under_reconstruction(request):
return render(request, 'reconstruction.html')
#index.html
<a href="{% url 'apologise-url' %}"> [content] </>
Answer the question
In order to leave comments, you need to log in
The problem was solved by sprinthost technical support.
The .htaccess file in public_html was empty. Didn't make sure I saved the settings:
DirectoryIndex site.wsgi index.html
Options +ExecCGI
AddHandler wsgi-script .wsgi
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /site.wsgi/$1 [QSA,PT,L]
Stanislav Shabalin what kind of hosting do you have? Is the proxy configured correctly?
It seems to me that the request does not even reach Django
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question