Hey fozdemir,
Your message is a bit unclear because the two URLs you’ve included are the same (/brand-category/travel-holiday-deals/travel-esim-deals/). So I’m not sure what kind of redirection or loop is happening.
The main point of the answer:
If you want 404 Solution to not redirect from a non-existent page to a 404 error or to any other page, then you can create a custom redirect for that URL. In the redirect, choose the destination you want (a 404 page or a different page). If you move the redirect to the trash then the 404 may be redirected automatically anyway, if in your settings you have the “Create automatic redirects” checkbox checked (it’s the second option on the Options page for 404 Solution).
Other details:
I did create a custom post type and do some testing and I found the following.
- The 404 Solution plugin does redirect from a custom post type URL to a different URL. This happens because the custom post type URL is not a page, and therefore causes a 404 error. Note that the plugin only redirects when a 404 error is found – it does not redirect otherwise.
- I deactivated the plugin and changed the slug of the destination page (the one that was being redirected to) and even with the plugin deactivated and the new slug, WordPress still redirected me from the custom post type slug to the destination page just like before. This means that WordPress itself and not the plugin is redirecting to that page for some reason. I don’t know if this covers your situation because I don’t have the details of what kind of redirection is happening for you, but if you deactivate the 404 Solution plugin, clear your browser cache, and try again then you can see if the redirection still occurs, in which case it’s WordPress (or a different plugin) that’s redirecting you and not the 404 Solution plugin.
- After moving the destination page to the trash and with the 404 Solution plugin deactivated, I was able to get a 404 error when visiting the custom post type URL.
To summarize, without more specific information I can only guess at what’s happening. Also, there may be redirection that happening due to WordPress itself, and not due to the plugin. 404 Solution only redirects if a page does NOT exist and a URL causes a 404 error. So for it to redirect from a custom post type URL it means that URL is causing a 404.
Please note that custom post types are not like categories, e.g website.com/category/category-name/ automatically has a page in WordPress and does not cause a 404 error – it lists the pages in that category. A custom post type is not the same. When you go to website.com/custom-post-type/ it causes a 404 error.
The 404 Solution plugin redirects 404 errors based on the URL and especially the last part of a URL. Therefore, if there is a page or post with the slug “travel-esim-deals” or anything similar to the slug of the custom post type, 404 Solution will redirect from the custom post type to that page. My guess is that what you want to happen is for the site to list the posts in the custom post type. I couldn’t find a plugin that does that – all of the examples I found involved adding custom files and PHP code.
Let me know if you need more clarification or want to provide more details.
thanks
-
This reply was modified 12 months ago by Aaron.
-
This reply was modified 12 months ago by Aaron.