If you use
/home/shaliu/Projects/Nominatim/website/search.php
In this case, your location begins with /, which means that the home folder (directory) must be inside the server’s root folder. For example, as a local server, if we consider XAMPP, the home folder should be inside C: \ xampp \ htdocs (in the general case), and if we consider WAMP, then the home folder should be inside the www-folder.
If your home folder is inside the folder where your current page is located, you should use
home/shaliu/Projects/Nominatim/website/search.php
No / (slash required).
Secondly, you need to replace +. to concatenate a string.
SO, if your home folder is inside the server root directory, you should go with
header("Location: /home/shaliu/Projects/Nominatim/website/search.php?q=".$query);
Otherwise you must go with
header("Location: home/shaliu/Projects/Nominatim/website/search.php?q=".$query);
Ravi
source share