/cache url requests causing 404 errors - php

We are developing a PHP webapplication. Lately our apache logs show that Apache serves a 404 error page for a particular case. The logs indicate that the HTTP_REFERER is: http://ourhost.com?gclid=some_id. The REQUEST_URI is: /cache/some_other_id.
Our webapplication is build with symfony 1.4. Our webapplication does not serve any pages beginning with /cache, it therefore serves a 404 page. The webapplication also does not serve pages containing a link to /cache/some_other_id.
Why does Google (crawler) try to visit URLs beginning with /cache?
How should we handle these 404 errors?

It would seem it is this issue. Basically, some kind of browser extension making such requests... There is a suspicion of "Browser Companion Helper", part of "Ginyas Browser Companion" doing the requests.
I don't see much that can be done about it from the server side, except possibly advise a user that they have malware on their browser.

Related

CodeIgniter site's url is not working while in live

My developer recently had some negative argue with me and he has stopped working on my site anymore. I have shifted my site to a new web server and uploaded all the files by myself. (I really have poor idea with .php, WordPress, CodeIgniter).
Now the site is showing error like the below while I click in any link.
Not Found
The requested URL
/news/details/রোহিঙà§à¦—াদের-ফিরিয়ে-নিতে-মিয়ানমারের-পà§à¦°à¦¤à¦¿-রাষà§à¦Ÿà§à¦°à¦ªà¦¤à¦¿à¦°-আহà§à¦¬à¦¾à¦¨
was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.
how can I make the site live now?
my sites url: http://www.dhakagazette.net
the index now can be located at http://www.dhakagazette.net/.index.php
please suggest to make my site live.
Thank you

Typo3 strange https redirects

i have a really weird problem on a typo3 site.
The site currently runs on Typo3 4.6.6 (yeah i know we are in the process of upgrading it to 6.2 LTS)
In the backend we have 3 separate pages. The webspace where this site runs was currently upgraded to PHP 5.5. Nothing else has changed (as far as we know)
The problem is that on certain pages we get redirected to a https version of the same page, although the link is a http link.
See for instance here: http://www.phd-cell-signaling.at/home.html
If you open this it loads fine. But as soon as you click on a (http) link on the site, you get redirected to an https version hence the browser doesn't load all the stuff included via http (stylesheets for instance). But when you then delete the "s" from the address bar and hit enter you don't get redirected. And this is something i don't really understand.
And if that'd be a general issue shouldn't the other pages in the same typo3 environment also be affected? Or am i missing something here.
Since I'm not that familiar with typo3 it would be greatly appreciated if somebody could link me in the right direction where the problem could be.
We use realURL for example. But I checked the configuration i found and it doesn't appear to do anything that causes the redirect.
I also checked the typoscript configuration of all the pages in the backend with no success.
Are there any other plugins that might cause something like this?
Any help greatly appreciated.
When you follow a link on the page you posted, then the webserver returns the statuscode 301 (moved permanently) with the new location for that page (which is the requested page with the HTTPS scheme).
When TYPO3 is properly configured for SSL usage for single pages (so a backend user can use "Choose protocol" selectbox in the backend), then it already renders affected links with the proper scheme.
Your problem described can have multiple reasons. Please check the following:
Inspect the .htaccess file in the root directory of the TYPO3 website for any scheme redirects
Check if the webserver itself has configured scheme redirects for that virtual host
Goto the TYPO3 extension manager and search for local installed HTTPS or SSL redirection extensions

Strange issue with 404 error pages

I have a website set up that uses a custom 404 error page. This seems to be working on most pages.
In fact, I have two different error pages that I want to show, and now a third that I just found out about.
This page, which does not exist, shows the correct error page that should be shown if a page cannot be found. This shows the error page as configured in my .htaccess file:
http://www.canadiancommuter.com/wontfindthis.php
This error page is generated from my PHP code if someone tries to access an old article that no longer exists in the database:
http://www.canadiancommuter.com/2334054466-some+old+article.html
However, this link, which will also generate a 404 error, shows a different error page (which usually includes advertising):
http://www.canadiancommuter.com/2012062500-TTC+asks+Ministry+of+Labour+to+treat+CNE+like+Rolling+Stones+concert%2FCaribana.html
I know the reason WHY this URL doesn't work. I purposely added characters to it to cause it to return a 404 error. My problem is that I can't figure out WHERE this other 404 error page is coming from.
It's not in my .htaccess file, the error page from my .htaccess file can be seen in the first link above.
It's not in my code. The only error page generated by the code itself can be seen in the second link above.
The only other places it could come from is my domain registrar, and my web host.
The domain is registered through one registrar, but points to my hosting account with another provider. The registrar says that because I'm just pointing the DNS for my domain to we web host the error page wouldn't come from them, but would come from my web host.
My web host says this error page isn't coming from them, but must be in my code.
I've heavily modified all of the code used for this site, so I'm pretty confident that the error page is not coming from there.
Does anyone have any ideas where I should look for this error page?
(Just a note, I'm not certain the registrar or the web host were entirely sure of what they were talking about, so I haven't ruled out either of them as being the source of this page. However, a thorough look through the administrative consoles for both do not reveal anything to this effect.)
Your pages are being served through a proxy running cloudflare-nginx which could be catching some 404 errors because slashes in either / or %2F form cause a different 404 page to be served.
Do you have an .htaccess rule that catches all of the possible 404 errors and not just the ones that match your filename scheme? If not, try setting one up. You could also try to run the site in a local server instance and see if the 404 pages behave as expected.
Edited because I mistakenly took characters produced by Transfer-encoding: chunked to be caused by misconfifguration
If (as you have already determined) your code doesn't generate the error page, then the "mysterious" 404 page comes either from the default websersver configuration (which is presumably controlled by your hosting provider) or indirectly from your DNS service (if your webserver redirects your browser to an unregistered domain, for example, then you may be redirected to a page which invites you to buy it).
The most straightforward way IMO to track this down is by using a browser equipped with machinery for tracking redirects (e.g. Firefox with the Firebug extension installed). If the error pages are indeed coming from your domain (and not a misspelling of it), then that implicates the default webserver configuration (and so presumably your hosting provider).
EDIT:
Re-reading the above I realize that I should clarify: your DNS service can't simply "redirect" you somewhere. If you find that typing a non-existing domain into your browser redirects you to a page with advertising then you can be fairly sure that it's your network connectivity provider that is inspecting your HTTP request, doing a DNS looking on your behalf behind the scenes, and redirecting you.
This is absolutely from your host provider!!
When %2F is given in url, nginx cannot handle that as an error (this might be a bug!) and it displays your host's default error page, you can see the same error on other websites hosted on the same server as your site:
http://aias-uic.org/not-found.html
http://halfdrawn.com/not-found.html
http://flyingmantis.com/not%2Ffound.html
...
and there are many other websites on the same server as your site! (you can check their IP to be sure)
The last one uses custom error page, so with %2F the mysterious error page is shown!
You can also disable your custom error pages for a while and you will probably get the mysterious error page!

interesting facebook status code 500 error on linux server, PHP

index.html is working on facebook debug.
index.php is not working on facebook debug.
this site is reachable, but facebook is not reaching. what is the problem?
Though it works in the browser, when I try to load your site from the command-line using CURL, it responds with an 500 Internal Server Error and no page. It seems that your site blows up whenever the client doesn't send the Accept-Language header. This header is optional, so you probably shouldn't do that.
Your page is returning a 500 error to Facebook's crawler.
Also when I check it manually I get the same problem, as Jeremy reported.
Do you have any logic in your PHP which checks the user agent header and does different things on different user agents?
The Facebook crawler presents as
facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)

page redirection with unknown pages

I am developing a website in php.
when a user types a page which is not in my site, i want users to redirect to a page with an error message.
how can i identify such things and how can i do this??
Thanks.
If you're using Apache web server, you get this functionality for free. No need to implement it yourself. If the web server cannot find an resource it sends the client an HTTP 404 error (not found). Actually, pretty much any web server that correctly implements HTTP (1.0 or 1.1) will behave this way. Additionally, in Apache, you can customize the 404 page.
If you're using Apache, here's instructions:
http://www.thesitewizard.com/archive/custom404.shtml
This is not really a php feature, but more of a feature of your web server. In IIS you can configure the error page to go to a custom url. In apache i think you can usr mod_rewrite to achieve the same thing
Other than what others said this might be of some help too "Custom 404 Error" if you are using Apache.
If some script is launched on all of your pages (it can me unit, which is always included) you can make a check there. You should write there all of your available pages and if the required page is not in the list - you can show person, that he/she was wrong.
Sometimes the list of pages is jept in database. Most CMS-systems are based on that.

Categories