Probleme with url after /
-
Hi there,
how can I make a redirect of everything after the last / because actualy if I remove the slug of my CPT and if I test a non existing url like /545zfgdfhgdefg/ this url still work and do not return a 404?
Can you please help me?
Regards
Hi, that’s weird, I can not replicate your issue
As you can see this is my demo site:
It works for CPT:
[Hidden link] Please register to view this link
[Hidden link] Please register to view this link
[Hidden link] Please register to view this link
And return 404 for random URL:
[Hidden link] Please register to view this link
Can you turn on DEBUG mode and send me your URL?
URL of some post from CPT that works
Sure you can test here:
I got 3 Hierachical CPT :
Level 1 : https://64pixels.net/test/sdfsf/?debug > query attachment
Level 2 : https://64pixels.net/test/test1/sdfgsfdgsdfg/?debug > query error 404 but the page is not redirect as a 404 page
Level 3 : https://64pixels.net/test/test1/test2/sdg/?debug > query error 404 but the page is not redirect as a 404 page
Really strange.
Thanks for your help.
ok, now I understand, what you mean
well yes, this is problem because of custom query_vars and add_rewrite_endpoint
when someone want to use it, then this is only way how it can work
I will try to do additional check for registered endpoints 😉
Hopefully it will be fixed in next version, I’ll let you know
Hi, you can try new version 5.1, there is completely new solving mechanism for endpoints, pagination, etc.
Let me know if everything works for you 😉
- You must be logged in to reply to this topic.