htaccess Google Seach Console Redirect Error Problem - wordpress

My Wordpress website keeps getting refused by google search console, and i've spent a week trying to fix this problem (tried many different solutions). When I used a third party SEO crawler. It located the redirect error to a problem in http://www.examplesite.com to https://www.examplesite.com .
Google: Page fetch error Failed: Redirect error
So, having had experience before with SSL and redirects with htaccess with different websites before, i thought this would be an easy fix. apparently it isn't, and I still can't find a fix. I tried many different htaccess solutions. All my links in the xml sitemap use https. all my wordpress settings are set to https://www.examplesite.com . And I have no idea what I am doing wrong, what change, and what to do. I can only think the problem lies in the htaccess file. And I don't what code to use anymore. (yes, i've also disabled all the plugins)
Thank you.

Found the solution:
Add code in functions.php:
remove_filter('template_redirect','redirect_canonical');

Related

Gravity Forms file upload leads to 404 in WordPress Admin

I'm current having an issue with Gravity Forms. I have several forms with an upload function, but when people upload a file i can't view it in the backend. It just leads to an 404 error.
The file destination is: /index.php?gf-download=2018%2F10%2FRegnskabsskabelon-International-transport.pdf&form-id=7&field-id=101&hash=923ee8ba8c7bb431ea0c6b60ac4b0b8cd345b1ed452d8b4d3bddf1579ea961bf
I can't seem to find the file in FTP.
I don't know how to troubleshoot this error or find the problem.
What i've tried:
Deactivating all plugins
Resetting permalinks
Using an standard theme
Updating Gravity Forms.
The error still occurs
Hope you can help
Currently on Gravity Forms Version 2.4.6
Best Regards
I was facing this issue with a client and just found a solution. It may not be universal though as most articles I found state that it is most likely a plugin conflict.
In my case it was simply an unwanted redirect of */index.html
There is already a redirect set in htaccess to route index.html to index.php and if there is a secondary redirect of index.html to a given page, you get a 404.
Hope this helps someone, as I haven't found any concrete solutions.
I also just encountered this problem, and after head much scratching discovered that one possible cause is if you have moved Wordpress to/from its own folder but moved the index.php file instead of copying it. Copying index.php back to its original location fixes the 404 error.

Fixed URL Injection in WordPress site

Since some days ago i have received some alerts from Google about errors in my web site, i had been fixed them, some about 404 errors.
But i really doesn't know what to do with the last one, is about an url injection in my site, i don't know how to fixed this.
The url reported is: http://www.4lytics.com/buckleya/illusioned/5994_1261/380buckleya/
I updated the CMS (WordPress) and delete some files I tried with some security plugins to find malware but it doesn't get anything.
What can i check far away from the things i made?
Thanks
There is no such 404 error on http://www.4lytics.com/buckleya/illusioned/5994_1261/380buckleya/ . There may be any css or js file is not loading properly.

My website showing 404 page not found again and and again . how to solve that?

My website showing 404 page not found again and and again . how to solve that? After permalink changes ,
it's working well for sometimes then again showing same error.
Steps I tried:
permalink changes
.htaccess edit
clear caches
made .htaccess file as read only..
But I need permanent solution . Please help..
As you're writing that you've already made the .htaccess read-only, I assume that it doesn't change when the problem occurs?
It sounds like something is messing with the wordpress rewrites. Maybe you could add a filter to rewrite_rules_array, use debug_backtrace() and log that to a file to track down the code that is changing the rewrites.
First of all please make sure mod_Rewrite is enabled on your server and working.
Please check your error log files and post the errors in your question, it will help us to detect the issue.

One page won't show on wordpress after moving from live to localhost

I moved my website from live to localhost to make some modifications to it and I have encountered a problem, one page will not show up: "Oops! That page can’t be found.".
I have tried the following
1. activated rewrite_module
2. deactivated each plugin to see if anyone is causing the problem
3. recopied the database and files in case of failure during the first transfer
4. read that resetting permalinks might solve the problem. Changed permalinks to default - the page now works, but when I changed back to custom the problem is still there.
This is weird because only one page does not seem to show, every other page works fine and also there is no problem on the live version.
I ran out of solutions can any one please help?
This may be caused by the permalink or .htaccess
check the url of your page if no issues on URL then
Follow this steps once:
Go to settings-> permalink-> set it as default ->Reload or refresh
Then again now Go to settings-> permalink->postname
Your .htaccess will get update with the permalink.
This could be a problem with htaccess. When using the query string urls in wordpress, no htaccess is required, but for anything else Wordpress uses mod_rewrite.
Is htaccess turned on your localhost Apache server? In httpd.conf, AllowOverride All should be turned on in your active directory.
Is Wordpress able to create new files? Insufficient permissions might prevent it from creating the htaccess file.
Finally, check that your links are pointing to the right place. Sometimes the problem is as simple as a misspelling in your link ;) Good luck.

Something is creating strange URLs in Wordpress Website

I have a problem with a Wordpress based website. Something is creating strange URLs. I know about those URLs, because Google Webmaster Developer try to Crawl them and the Crawler gets a 404 error (Not found). I have that problem in different websites:
In the first one the URLs looks like spam:
http://xxxx.com/wp-content/w3tc/apple-iphone-3gs-8gb-black-manual
In the other website the URLs make sense based on the content, but they are not valid URLs:
http://xxxx.com/portfolio/pool-view-suite-bathroom/
In other website, it's creating URLs that looks like valid, but with a ".html" in the final
If you try to access those URLs, you will get a 404 error. Curiously, when you look the "Linked By" tan in Google Developer Tools, you will see that is linked by another strange URL o there is no linked from. And that URLs are not in the sitemap, I checked it.
Thank you!
the first one is a trojan without a doubt. Quite usually, you'll find them in index.php, footer.php, header.php . If in doubt, check with an online tool like Sucuri
Once you isolate it, it's very important to know how you have it. While most people thinks they have been "hacked", in most cases you uploaded it by yourself from your own computer, so be sure to scan it thoroughly.
About the other cases, sounds more like an htaccess issue, but based on the first case, quite probably it's caused by this trojan as well. Ask your host to check the site, it's in their best interest to do it so. But assuming it's just htaccess, try this: go to Settings --> Permalinks and change the permalinks structure to anything else than what you have now. Don't hit the submit button yet. In the meanwhile, BACKUP your htaccess file and then delete it. Hit submit on the permalinks page an a new .htaccess file will be created. Try your site now. If it works, it was just a simple htaccess issue. If not, something else, going from a trojan to a server misconfiguration to anything in between
Maybe the domain was used before and you are seeing past valid urls which are now 404, or maybe these are incorrect, inbound spammy links which you would want to be 404. Duff links can be found anywhere on the internet and so no reason to think your site is generating them.

Resources