Conditional redirect hack (Google) fix?

Discussion regarding Joomla! 3.x security issues.

Moderators: mandville, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant / FPA - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
bill0287
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Sep 15, 2020 4:07 pm

Conditional redirect hack (Google) fix?

Post by bill0287 » Tue Sep 15, 2020 4:19 pm

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.

User avatar
Rondeb
Joomla! Guru
Joomla! Guru
Posts: 623
Joined: Mon Dec 02, 2013 12:14 pm
Location: Meschede - Germany
Contact:

Re: Conditional redirect hack (Google) fix?

Post by Rondeb » Tue Sep 15, 2020 8:42 pm

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

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Conditional redirect hack (Google) fix?

Post by sozzled » Tue Sep 15, 2020 8:58 pm

Rondeb wrote: Tue Sep 15, 2020 8:42 pmvia 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 pmAnd 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)

bill0287
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Sep 15, 2020 4:07 pm

Re: Conditional redirect hack (Google) fix?

Post by bill0287 » Wed Sep 16, 2020 2:20 am

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?

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Conditional redirect hack (Google) fix?

Post by leolam » Tue Sep 22, 2020 6:22 pm

Link to your site?

Leo 8)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44175
Joined: Sat Apr 05, 2008 9:58 pm

Re: Conditional redirect hack (Google) fix?

Post by Webdongle » Tue Sep 22, 2020 6:26 pm

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?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Conditional redirect hack (Google) fix?

Post by leolam » Wed Sep 23, 2020 4:07 pm

@bill0287 if you want help answer to our questions

Leo 8)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -


Locked

Return to “Security in Joomla! 3.x”