I have set module according to documentation. Server reindexed files. When searching a string in files, it finds right files, but urls of found files are bad.
Format of bad url: http://server/search/search_files/sites/default/files/filename.ext
How to set correct urls of found files?
Comments
Comment #1
jrglasgow commentedWhen Search Files indexes the file it catalogs the full directory path on the server, when it returns the search page it takes the full path and removes the $_SERVER['DOCUMENT_ROOT'] from the full path, this should return a path relative to the server's Document Root looking something like this
which would return a link like this
It looks like for some reason your server's $_SERVER['DOCUMENT_ROOT'] variable included a trailing '/' and it removed that from the relative path for the file, so the relative path for the file looked like this
when this is turned into a link all web browsers interpret this to be relative to the current web page so
exactly what you are getting.
I have created a fix for this and created a new release 6.x-1.3
If you don't mind me asking, What version of PHP are you running, web server, Operating
system, etc...
Comment #2
stem commentedIt's OK. Thanks.
Comment #3
jrglasgow commentedComment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.