Skip to content
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

Do not append "?" or "&" if no params. #53

Closed
wants to merge 1 commit into from
Closed

Do not append "?" or "&" if no params. #53

wants to merge 1 commit into from

Conversation

serafinomb
Copy link

@serafinomb serafinomb commented Aug 16, 2016

Similar to: #47.

I've spent an hour and a half trying to debug the following issue:
while trying to fetch some Wordpress content using [{ $toxid->getCmsSnippet('section') }] I was always getting a 301 response. I've found out that the CMS URL, from http://sub.domain.com/, was being changed to http://sub.domain.com/?& causing the CMS to return a 301 redirect response.

The proposed change should solve the issue by not appending any additional character if not needed.
I've not fully tested it, it does work in my situation.

I've spent an hour and a half trying to debug the following issue:
while trying to fetch some Wordpress content using `[{ $toxid->getCmsSnippet('section') }]` I was always getting a 301 response. I've found out that the CMS URL, from `http://sub.domain.com/`, was being changed to `http://sub.domain.com/?&` causing the CMS to return a 301 redirect response.

The proposed change should solve the issue by not appending any additional character if not needed.
I've not fully tested it, it does work with my situation.
@jkrug
Copy link
Owner

jkrug commented Nov 18, 2016

Sorry, i've missed that one and merged another one doing the same but with not such a nice code. I will close this one, but would be happy if you redo that good work. Sorry for that!

@jkrug jkrug closed this Nov 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants