Reputation: 1876
Hello I have a problem that in my opinion is linked to permalinks, but I'm not quite sure.
The problem is that my site does only care about the last part of the argument in the url.
For example https://apriori.photo/kontakty/price does not exist. But it 301 redirects to https://apriori.photo/arenda-fotostudii/price/
I tried deactivating all the plugins and setting a default wordpress theme, the problem stays.
My permalink structure is : /%category%/%postname%/
Upvotes: 0
Views: 255
Reputation: 4611
WordPress has a feature where it automatically tries to redirect to a page which it deems to be 'the correct page' based on it's name. In your case, because the page ends with 'price', WP finds another page with a similar path and thinks it should redirect there.
To prevent this, you can disable the redirect using the following:
// In functions.php
remove_action('template_redirect', 'redirect_canonical');
Upvotes: 1