You will have to include lines for handling 404 response codes in your application code. In a Python web framework like Django, include it in a views.py file.
from django.shortcuts import render_to_response
from django.template import RequestContext
def handler404(request, exception, template_name="404/index.html"):
response = render_to_response("404/index.html")
response.status_code = 404
return response
In PHP you can include it in your main passthru file in the application directory, index.php. Within that file, you can then point to the custom 404 html file:
Comments
You will have to include lines for handling 404 response codes in your application code. In a Python web framework like Django, include it in a
views.pyfile.and then update
urls.py:(Source)
In PHP you can include it in your main
passthrufile in the application directory,index.php. Within that file, you can then point to the custom 404 html file:Please sign in to leave a comment.