Log in

View Full Version : error 404 php/html



chechu
01-10-2009, 12:51 PM
I have this .htaccess on my server:

ErrorDocument 404 http://www.cecicasariego.com
ErrorDocument 410 http://www.cecicasariego.com

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot@yahoo.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR]
RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR]
RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR]
RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR]
RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR]
RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR]
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR]
RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR]
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus
RewriteRule ^.* - [F,L]
My question is: when I type in a nonexisting url ending with .html, it redirects to the index. But when I type in a nonexisting url ending with .php, I get the normal error 404 standard browser page. What needs to be changed in the .htaccess, please ?

Example:
- go to http://www.cecicasariego.com/memyselfandi.html, and the .htaccess will redirect you tothe index.
- go to http://www.cecicasariego.com/memyselfandi.php and you see a normal 404 page

chechu
01-15-2009, 08:03 PM
Anyone please ?

Twey
01-15-2009, 09:19 PM
There's nothing there that could account for the weird handling of .php URLs. Do you have anything else applying to it?

chechu
01-15-2009, 09:57 PM
Sorry Twey, but I do not really understand your question.
This is the info I have, I thought it might be clear ?

Twey
01-16-2009, 12:14 AM
No, it isn't — there's nothing to explain why .php URLs are treated differently to all other URLs. The string '.php' isn't even mentioned.

chechu
01-16-2009, 03:56 PM
I really don't understand what you are asking, so let me try again:

When you go tohttp://www.cecicasariego.com/memyselfandi.html, you will be redirected to the index because of the htaccess above. But when you go to http://www.cecicasariego.com/memyselfandi.php you don not get redirected to the index. How come ?

Snookerman
01-16-2009, 04:00 PM
What Twey is saying is that there is nothing wrong with the .htaccess code that you posted. The problem must be caused by something else. Are you sure that there isn't any other code?

Hmm.. lets see if I remember any Dutch: Die code die jij hebt gepost is goed. Het probleem kommt van ergens anders.

@Twey - I don't know much about this, but could this be caused by PHP being turned off or something?

chechu
01-16-2009, 04:10 PM
And where could it come from ?
You can check the rest of the pages at http://www.cecicasariego.com I cannot find anything wrong in it (css and php codes). No idea.

Dutch: one mistake: "komt" with one m.
Now try in Flemish !

Twey
01-16-2009, 04:28 PM
Indeed — 'kommt' is German :)

No, it couldn't be caused by PHP being turned off. Clearly there's something in the site or webserver config that's doing something special to PHP URLs (note that any URL that doesn't end with .php, .php4, .php5, or .phtml behaves as expected), but this isn't it.

Snookerman
01-16-2009, 04:32 PM
It turns out it's not your fault. Other people have the same problem: http://csscreator.com/node/1247 (http://csscreator.com/node/1247)

This might be a solution: http://bugs.php.net/bug.php?id=24958 (http://bugs.php.net/bug.php?id=24958)

:D sorry for the "kommt", I learned Dutch from my German girlfriend but never learned to spell. Flemish however I don't speak..

I'm not sure but this might also be helpful:
http://www.terencechang.com/2008/08/28/codeigniter-no-input-file-specified-php-5-apache-2/ (http://www.terencechang.com/2008/08/28/codeigniter-no-input-file-specified-php-5-apache-2/)

Twey
01-16-2009, 04:44 PM
That's interesting. A PHP upgrade is necessary, then?

chechu
01-16-2009, 05:20 PM
I read the link, but can't get it.
What does this mean :

httpd.conf:
Alias /404.php c:/404.php
ErrorDocument 404 /404.php

How can I use this info adapting it to the htaccess file above ?