Page 1 of 1

Conditional redirect hack (Google) fix?

Posted: Tue Sep 15, 2020 4:19 pm
by bill0287
I am trying to help a friend with their joomla site. When you do a Google search for the site it comes up fine, but when you click on the main link it redirects to a spam site. My research online says this is likely a conditional redirect in the .htaccess file.

How do I fix that for them?

Also, I tried to ftp to their site but certificates come up and says "hostname does not match certificate" and my login fails.

Please help.

Re: Conditional redirect hack (Google) fix?

Posted: Tue Sep 15, 2020 8:42 pm
by Rondeb
Hello,

via the file manager of your hosting you can also rename .htaccess to htaccess.txt

And in the backend of joomla you must turn off url friendly urls.

Clean your cache of je site and browser, and see if the problem is solved!

Greatings Ron

Re: Conditional redirect hack (Google) fix?

Posted: Tue Sep 15, 2020 8:58 pm
by sozzled
Rondeb wrote:
Tue Sep 15, 2020 8:42 pm
via the file manager of your hosting you can also rename .htaccess to htaccess.txt
A few words of caution about this recommendation.

By default, J! ships with a file named htaccess.txt; it's a "template" (if you would like to describe it that way) for a vanilla-flavoured, "no frills" .htaccess file. If I were you, I would not replace the file htaccess.txt with something else (or something broken). I would, instead, rename .htaccess as something like htaccess.broken (or htaccess.old) or something like that instead.

BTW, J! ships with a several of these "no-frills" files that are replaced/overwritten when you update J! (see more information about them here >>> viewtopic.php?f=48&t=970181 <<<).

Rondeb wrote:
Tue Sep 15, 2020 8:42 pm
And in the backend of Joomla you must turn off url friendly urls.
Again this is not exactly true. I agree that, if you are using Apache and you want Use URL Rewriting = Yes then you turn on URL Rewrite. And, yes, the way to enable URL rewriting is with the file .htaccess. The file htaccess.txt—the normal one that comes with J! 3.x—has the necessary code for this and that's why you shouldn't delete it. However, the file htaccess.txt does not do anything unless you rename it or replace the file .htaccess with the contents of that file.

I hope this makes some sense. 8)

Re: Conditional redirect hack (Google) fix?

Posted: Wed Sep 16, 2020 2:20 am
by bill0287
As it happens, I just cleared the site cache from admin page and now the links are working in Google searches.

Do you think I have solved the problem or will it come back?

Re: Conditional redirect hack (Google) fix?

Posted: Tue Sep 22, 2020 6:22 pm
by leolam
Link to your site?

Leo 8)

Re: Conditional redirect hack (Google) fix?

Posted: Tue Sep 22, 2020 6:26 pm
by Webdongle
Is it just the link in the search results that redirects or if you directly access your site?
What security do you have on your pc?

Re: Conditional redirect hack (Google) fix?

Posted: Wed Sep 23, 2020 4:07 pm
by leolam
@bill0287 if you want help answer to our questions

Leo 8)