php - how do i show 404 error page without showing the error page's url? -


when users type non-existent page such

www.example.com\wrongurl.html 

i want users see 404 error page. url should not change.

i have tried following doesn't work.

errordocument 404 http://www.example.com/404.html  rewriteengine on rewriterule 404/ http://www.example/404.html [nc] 

how can this?

try following rules :

rewriteengine on rewritecond %{request_filename} !-d  rewritecond %{request_filename} !-f  rewriterule ^ /404.html [l,nc] 

this internally redirects request non-existing file/directory 404.html page.


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -