Unable to fix garbage url - wordpress

I am having a problem http://prntscr.com/587iwz
Generally any garbage/wrong URL should goto 404 page but in my case, it is going to some uploading page.
I am using Presscore theme.

Take a list of plugins and figure out the suspected plugins.. you could put a temporary maintenance plugin... or else check by deactivating the plugins when the traffic is less to website. Theme appears to be no issue. Then the possible problem could be either .htaccess or plugins.

Find that particular link in your web files and replace it, that's it.
You can use notepad++ or similar programs to search text in multiple files. My advice to you would be to not use nulled themes downloaded from random websites

Look at your .htaccess
Try adding this:
ErrorDocument 404 http://example.com/404/
ErrorDocument 500 http://example.com/500/
or map them to one error document:
ErrorDocument 404 /pages/errors/error_redirect.php
ErrorDocument 500 /pages/errors/error_redirect.php

Related

htaccess Google Seach Console Redirect Error Problem

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');

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.

WordPress - how to add a custom 500 server error page?

It seems easy to create a custom error page in WordPress for a bad page, i.e., a 404 not found - just create 404.php in the theme directory.
I'd like to do the same for a server error, say if a CGI script on my WordPress site does something stupid like divide by 0.
I tried creating a 500.php page in my theme directory but it appears to be ignored. Instead, the 404.php page in the theme directory is called.
It seems that WordPress somehow catches the server error and translates it into a "not found" error and then uses 404.php
How can I make WordPress go to a different custom page in case of a server error (500), as opposed to a simple page not found (404) error?
And before you tell me to put something like ErrorDocument 500 /path-to-custom-error-page in a .htaccess file, already tried that - it gets ignored by the web server, probably because the RewriteRule directives in the same file are used by WordPress to intercept and handle all requests (and no it doesn't matter if the ErrorDocument directive is above or below the WordPress RewriteRule section).
(Note: I tried researching this on my own, but search results are polluted by people complaining about getting server errors with WordPress, not asking how to create a custom page to handle them.)
WordPress will never be able to show your custom error page for a server error (500). You need to create a .html or PHP page, outside of WordPress. Your host may already have something to help you there, many have a folder into which you can put custom error pages, outside the website's root folder.
Since WP 3.0 you can override the standard error pages that wp_die() uses, with the wp_die_handler filter.
'wp_die' and 'wp_die_handler' are located in wp-includes/functions.php.
ErrorDocument 500 … should work in any case if the path is correct. Turn off WordPress's rewrite rules, produce a 500 error, and Apache should either show /path-to-custom-error-page or say it can't find it.

WordPress 404 Errors

I moved a Wordpress website from one server to another and I am now getting 404 errors on everything but the home page.
I also checked that the .htaccess file is there and the database contents. They are fine. Not sure what else could be causing this.
Any ideas from the community?
Assuming you have pretty permalinks enabled, are you sure that the new server has mod-rewrite enabled? You can also check to see if this is the problem by going to a pagelike yoursite.com/?p=1 where 1 is a page id.
Assuming the URL has changed
You need to update either the database or (if you're lucky) one of the .php files in the wordpress distro - see the wordpress article on this.
I had the same issue and ended up having to edit the database. You're seeing the 404's because wordpress thinks it's still hosted at the old URL and is therefore trying to retrieve files from it.
If the URL has not changed
Perhaps permissions need updating on the folders? The folders should be set at 755 and the files 644 (reference here).
Looks like you may have solved the problem - I had a similar problem where permalinks would not work, but the default links did work. I modified the .htaccess file to what Wordpress said to do. Twice I thought I had solved the problem, but didn't.
I had moved it to my local Ubuntu Karmic Koala system for testing, and found that the solution involved editing a file in /etc/apache2/sites-enabled. On my system, it was called 000-default.
This file had statements like the .htaccess file, and in two places had AllowOverride None, which I had to change to AllowOverride All. Apparently, this file overrides any local .htaccess files.
I also had to change the location of Wordpress in the main configuration, but that was obvious.
I hope this will help someone who has tried all the normal suggestions like me, and is still having problems.

Why does my wordpress 404 page appear blank?

I have built a few themes and noticed that the 404 pages, once uploaded to my server. never appear. They always do on my localhost setup, and even themes for others have worked.
I see no reason for it not to work, I have mod_rewrite enabled for the pretty permalinks but the 404 redirection seems not to want to work.
Is this a known issue?
Is it my shitty server with Streamline.net?
Can anyone help?
You can try setting your own error documents in .htaccess and that may override your hosts settings and that point to a static wordpress page called "error" or your 404.php in your theme
ErrorDocument 401 http://mydomain.com/error/
ErrorDocument 403 http://mydomain.com/error/
ErrorDocument 404 http://mydomain.com/error/
ErrorDocument 500 http://mydomain.com/error/
Edit: You can also do a redirect in your theme's 404.php file (yes, it's ugly...) to your static error page: <?php
Header("Location: http://mydomain.com/error/");
?>
If that doesnt work, I don't know.
Suffering from the same issue with Streamline. I guess it's due to the apache version used by this hosting 1.3.
If you have already a 404.php file in you theme template, if not create one. Then follow the steps below.
Step One: open you existing 404.php file in any editor, or create new one in theme directory.
Step Two: Copy/Paste below provided code in you 404.php file (make sure your 404.php file blank)
//404 Redirect to home in WordPress.
//Sara Domini
//301 Permanently Redirect
//http://2experts.net
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
For me and other works like a charm :))
It's rather bizarre that this is happening. If WordPress is working with pretty permalinks, then Apache is doing it's job - rewriting any URL that doesn't physically exist to WordPress.
It's then up to WP to decide if the request doesn't match anything, and if so, display a 404.
Perhaps Streamline is screwing this up, by reading the '404 Not Found' header that WP kicks out and fiddling with the output?

Resources