razonyang / hugo-theme-bootstrap

A fast, responsive, multipurpose and feature-rich Hugo theme.
https://hbs.razonyang.com
MIT License
508 stars 166 forks source link

Search returns an error message #114

Closed jehoshua7 closed 3 years ago

jehoshua7 commented 3 years ago

If I use the search form at https://......./en , I get an error message

The requested resource /en/search?q=video is no longer available on this server and there is no forwarding address. Please remove all references to this address

It is apparently an Apache error in response to a "410" (Gone).

Yet if I go to https://...../en/search/ and use the search feature, it returns the expected results. Now there was a comment by @razonyang at https://github.com/razonyang/hugo-theme-bootstrap/issues/112#issuecomment-869324473 , in regards to archives and search, yet I have checked the contents of those files and they seem to be okay.

Besides, I have done a fresh install of this theme, therefore all files I have locally will be exactly the same as https://github.com/razonyang/hugo-theme-bootstrap

razonyang commented 3 years ago

It seems an issue of web server. I will check it later.

jehoshua7 commented 3 years ago

@razonyang thanks. It doesn't happen locally at http://localhost:1313/en/ , and I see it doesn't happen on the site at https://hugo-theme-bootstrap.netlify.app/en/ , so something slightly different ?

razonyang commented 3 years ago

@jehoshua7 I tested it in LiteSpeed(1.7.11) web server, anything works fine, I'm afraid I can't help you more.

Clould you please provide extra details of the web server configuration, such as rewrite rules and the .hataccess.

You can also ask for help in the forum.

razonyang commented 3 years ago

@jehoshua7 the problem is that the web server doesn't handle the page which URL contains query string correctly, such as http://localhost/en/?foo=bar, http://localhost/en/search/?foo=bar ... I think it's probably a server configuration problem.

jehoshua7 commented 3 years ago

Oh my apologies @razonyang , I had totally forgotten about some .htaccess (ModReWrite) rules to issue error messages if there was a "?" in any query. Yes, as you say, server config. I'll change the .htaccess rules. Thanks for your help :100: