Conditional redirect hack (Google) fix?

Discussion regarding Joomla! 3.x security issues.

Moderators: Bernard T, mandville, fcoulter, 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.
Post Reply
bill0287
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
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! Enthusiast
Joomla! Enthusiast
Posts: 225
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

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 9697
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 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)
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

bill0287
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
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: 20243
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ 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 -
#Joomla Webmaster Services: gws-webmaster.services

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 39126
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
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein.

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20243
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ 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 -
#Joomla Webmaster Services: gws-webmaster.services


Post Reply

Return to “Security in Joomla! 3.x”