How to protect a specific URL from redirect_canonical?
-
I’ve got a directory on the website, outside of the WordPress system. It’s a fairly simple application for a short term need, but I can’t figure out how to just use a simple http://mysite/mydirectory/myfile address without having “/mydirectory/myfile” munged by redirect_canonical() into something that ends up being like http://mysite/mydirectory-almost/otherstuff/myfile-maybe
I’ve tried making “mydirectory” and “myfile” strings that don’t appear in the WordPress site, but that doesn’t seem to work either.
I see there is a filter
https://developer.wordpress.org/reference/hooks/redirect_canonical/
but I don’t see how to use it to turn off the redirection for one specific directory.
Again, this is a short term need and I’d rather not rearchitect things if there is a simple way to get around this.
Thanks much!
- The topic ‘How to protect a specific URL from redirect_canonical?’ is closed to new replies.