-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preview URL 301 redirect #118
Comments
To fix trailing slash issues, ensure that the trailing slash configuration is the same in Magento and WordPress. You should change WordPress to use the same configuration as Magento. WordPress determines whether to use a trailing slash based on the permalink structure at WP Admin > Settings > Permalinks. If the URL structure here has a trailing slash then all WP URLs will. From the look of it, your Magento site does not use a trailing slash so make the permalink structure in WordPress also does not use a trailing slash. |
Thanks for replying so quickly Ben. Interestingly, there is no trailing slash only custom url /%postname% If i click on use post name I get /%postname%/ I'll have a play around and see what happens EDIT -- Just to keep this all in one place. Adding the trailing slash /%postname%/ in Wordpress permalinks and the preview function works again |
Great, thanks for confirming. I think this is resolved so I will close the issue, but if the issue is still open or comes back, feel free to re-open and comment again. |
Sort of resolved. Doesn't work when I remove the / again. I'm just going to leave the ending / on for the moment so the previews work |
Could Magento be redirecting the URLs? Do all URLs with trailing slashes redirect? |
Yeah, all other URL's remove the trailing slash. It's being used in conjunction with Mageworx SEO Suite, so I suspect it is something to do with that. If I turn on trailing slash on wordpress, it remains on the blog section and isn't removed, so that is particularly strange situation if it's being affected for previews, but not if it's intentionally being added. |
Does disabling Mageworx SEO resolve the issue? I've tried recreating locally but I can't trigger the redirect |
We've recentlly updated the connector, however it appears to now be 301 redirecting preview links to the blog base
On closer inspection it appears to be due to the ending /
https://www.domain.com/blog/?p=3313&preview=true&preview_time=1666101335 <!-- 301 redirections to https://www.domain.com/blog
https://www.domain.com/blog?p=3313&preview=true&preview_time=1666101335 <!-- Preview is correct
It might be related to another module cropping trailing slashes. We're still investigating at this phase, but wanted to flag because this is an issue for stores that do crop trailing slashes
The text was updated successfully, but these errors were encountered: