Having Issue With “Wp Redirection” ( How to Fix It) – 2019

WP help

Here are some frequently asked questions:

I deleted a redirection, why is it still redirecting?

Your browser will cache redirections. If you have deleted a redirection and your browser is still performing the redirection then clear your browser cache.

Can I open a redirect in a new tab?

It’s not possible to do this on the server, whether using Redirection or otherwise . Instead you will need to add target="_blank" to your link.

Can I redirect an anchor (#)?

No, the anchor is not sent in the request and is not received by the server. You will need to do any redirections on the client using JavaScript.

Can I redirect all 404 errors?

No, and it isn’t advised that you do so. A 404 error is the correct response to return for a page that doesn’t exist. If you redirect it you are indicating that it once existed, and this could dilute your site.

Use a plugin like 404 Page to improve your error pages.

I get a lot of weird URLs in my 404 log, what should I do?

Redirection reports on your site but doesn’t add any interpretation of why stuff is happening.

You can use the log information, such as IP, user agent, and referrer, as well as your own personal knowledge of the site, to understand the requests more. If they are coming from your own site then you should fix any bad links that causing the requests. If they are coming from another site then you can ask the other site to update their links.

Sometimes the requests are made by bots, and there is nothing you can do about this other than blocking their IP address.

The 404 log is not a todo list and you shouldn’t think you need to ‘fix’ it. A 404 is a valid response for a page that doesn’t exist and has never existed.

I’m trying to redirect a PDF and it doesn’t work

Your web server is probably configured to handle PDF files directly rather than pass the request through to PHP and WordPress.

If you are trying to redirect a PDF file that still exists then you should delete the file, and your web server will likely then pass the request through to WordPress.

If this still doesn’t work then you will need to save the redirect to Apache .htaccess.

I’m trying to redirect a .html/.php / .aspx file and it doesn’t work

Please see the above FAQ for PDF files – the same solution applies.

How do I give access to non-administrators?

You can use the redirection_role filter to create your own plugin that is specific to your setup. You will need to create a file in your wp-content/plugins directory with the following code:

Plugin Name: Allow Redirection Access
Description: Allow access to Redirection
Version: 0.1
add_filter( 'redirection_role', function( $role ) {
return 'edit_posts';
} );

This would allow editors to have access to Redirection. You can use any capability  (although really you shouldn’t make it available for anonymous users!).

Please remember to activate the plugin.

About the Author

Leave a Reply