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

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

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