When I put something after my domain name that doesn't exist I am taken to my 404 page, for example:
example.com/sdkjhfdsjk
But if I put something that exists as an image I am taken to the page for that, for example:
example.com/imagename
How can I turn this off. I only want to be taken to pages or posts that exist.
UPDATE: This has been marked as a duplicate but the accepted answer to that does NOT fix this.
I added:
remove_action('template_redirect', 'redirect_canonical');
to my themes functions.php
but the same action happens.