Disable WordPress URL auto complete

I recently noticed that WordPress tries to auto-complete a URL when it’s not submitted in its entirety. E.g. I have a post URL that looks like this: http://www.mysite.com/some-post-title If I browse to the following URL: http://www.mysite.com/some-post-ti I can see that the URL is submitted to WordPress but that WordPress is doing a 301 redirect to … Read more

How do I skip wordpress’s 404 handling and redirect all 404 errors for static files to 404.html?

How do I skip wordpress’s 404 handling and redirect all 404 errors for static files to 404.html? I read and it seems its not possible when using permalinks? The objective is to reduce the server load for 404 errors by not loading php. 7 .htaccess skip WordPress 404 error handling for static files. <IfModule mod_rewrite.c> … Read more

Admin Page Redirect

Is it possible to redirect users to an admin page if they access another admin page? For example if they a user ever hits “all pages” /wp-admin/edit.php?post_type=page they would get redirected to “add New page” /wp-admin/post-new.php?post_type=page 3 /** * Redirect admin pages. * * Redirect specific admin page to another specific admin page. * * … Read more

Which hook should be used to add an action containing a redirect?

I want to build a plugin that grabs certain url params from the query string to build a new query string for the same page. I’m following the excellent the Professional WordPress Plugin Development book, but I’m not sure which hook to use for this action. Here is my action function: add_action( ‘init’, ‘tccl_redirect’ ); … Read more

How to prevent automatic redirection of 404 errors and “incorrect” URLs?

WordPress has a feature whereby it will automatically redirect your URLs if it percieves them to be written wrongly. Here is an example: I have a page called my-page If I go to: www.mysite.com/something/my-page/ it will immediately redirect me to www.mysite.com/my-page/ as nothing exists at the first URL. How can I turn this feature off, … Read more

“Too many redirects” ONLY when trying to access wp-admin page

I figured I would ask my own question seeing as the duplicate question(s) still haven’t been answered. For some reason after my fresh install of WordPress 4.9.1 on my Ubuntu VPS, enabling my “flexible” SSL issued by Cloudflare, and finally switching my URLs in WordPress (from “https://foo.com” to “https://foo.com”) I can no longer access my … Read more