Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Changing default query URL
- This topic has 11 replies, 2 voices, and was last updated 2 years, 6 months ago by
willgreeny59.
-
AuthorPosts
-
November 13, 2023 at 12:41 pm #45992
willgreeny59
ParticipantHello,
How can I change the default URL search of Ajax Search Pro from ‘?phrase=’ to something like ‘#search/q=’?
Kind regards,
Will
November 14, 2023 at 1:09 pm #46004Ernest Marcinko
KeymasterHi Will,
You can adjust that URL via these settings: https://documentation.ajaxsearchpro.com/behavior/return-key-and-magnifier-icon-click-actions
November 14, 2023 at 8:04 pm #46029willgreeny59
ParticipantYou cannot access this content.
November 15, 2023 at 1:13 pm #46037Ernest Marcinko
KeymasterI think there might be missing a query separator, the “?” sign. When I do it like this on my local server:
/#search/?q={phrase}Then it seems to work correctly. This should do the trick.
November 16, 2023 at 2:20 pm #46072willgreeny59
ParticipantYou cannot access this content.
November 16, 2023 at 2:33 pm #46073Ernest Marcinko
KeymasterOkay, how about an & mark instead of the “?”:
/#search/&q={phrase}November 16, 2023 at 2:36 pm #46074willgreeny59
ParticipantYou cannot access this content.
November 16, 2023 at 2:43 pm #46075Ernest Marcinko
KeymasterIt should work like that, if I try it on my local server with this:
/#search/q={phrase}It redirects me perfectly. You may have a script there or a .htaccess mod_rewrite rule that also affects that and converts the URL after redirection. It should work with anything you put in there. Some browsers do treat the anchors differently and prevent redirection when they see one, so that’s why I recommended the “?” or “&” to basically trigger that.
November 16, 2023 at 4:42 pm #46076willgreeny59
ParticipantYou cannot access this content.
November 17, 2023 at 11:38 am #46083Ernest Marcinko
KeymasterOn my end it works on any given page, home, subpages, regardless of the URL. I tried to trigger the error but no luck unfortunately.
If you want, you can add temporary FTP and back-end access, I can take a look.
Before that I would start by removing any custom code you may have, disabling all plugins temporarily, reverting the .htaccess file to default to see if anything changes. If it works then, then there is a conflict somewhere. If not, then it is still possible that the borwser just does not trigger a location change only based on the hashtag without query arguments.
November 17, 2023 at 1:28 pm #46089willgreeny59
ParticipantYou cannot access this content.
November 17, 2023 at 1:35 pm #46090willgreeny59
ParticipantYou cannot access this content.
-
AuthorPosts
- You must be logged in to reply to this topic.