473,396 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Error Pages with .htaccess

Hey,

I've done the standard old trick of adding the error page line into
..htaccess which works absolutely fine if I accidently go to any file
other than .php But if I go to "doesntexist.php" I get a different
error message seemingly already installed somewhere on the server.
Does anyone know how to override this? There must be a setting somewhere!

Cheers in advance,

(I know this isn't really the right NG but i hoped someone would know! :)

Adam
Jul 17 '05 #1
3 1736
Adam King wrote:
I've done the standard old trick of adding the error page line into
.htaccess which works absolutely fine if I accidently go to any file
other than .php But if I go to "doesntexist.php" I get a different
error message seemingly already installed somewhere on the server.
Does anyone know how to override this? There must be a setting
somewhere!


Are you getting a standard 404 error page? Then your host doesn't allow
htaccess override.

Test this by making a deliberate error in the .htaccess file, which should
trigger a 500 internal server error when the file is actually interpreted.
JW

Jul 17 '05 #2

Janwillem Borleffs wrote:
Adam King wrote:
I've done the standard old trick of adding the error page line into
.htaccess which works absolutely fine if I accidently go to any file other than .php But if I go to "doesntexist.php" I get a different
error message seemingly already installed somewhere on the server.
Does anyone know how to override this? There must be a setting
somewhere!
Are you getting a standard 404 error page? Then your host doesn't

allow htaccess override.

Test this by making a deliberate error in the .htaccess file, which should trigger a 500 internal server error when the file is actually interpreted.

JW


had the same problem. that works for me in .htaccess:

#php files
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) abs_uri_of_your_error_doc
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) uri_of_error_doc
RemoveType x-mapp-php4 .html

#html files
ErrorDocument 404 uri_of_error_doc

micha

Jul 17 '05 #3
Thanks for your advice, I haven't had chance to check it out yet, but
the help is much appreciated!!

Adam
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Trevor Orton | last post by:
Hello, I'm having a slight problem using the W3C html validator and I've reviewed the FAQ's with no luck so hopefully someone here would be kind enough to point me in the right direction. I...
67
by: Sandy.Pittendrigh | last post by:
Here's a question I don't know the answer to: I have a friend who makes very expensive, hand-made bamboo flyrods. He's widely recognized (in the fishing industry) as one of the 3-5 'best' rod...
29
by: CAH | last post by:
Hi Can you avoid that googlebot indexes PHPSESSID pages? Googlebot is indexing pages with PHPSESSID, which makes it think my page has a infinite number of pages. How can one avoid this? ...
1
by: falagar | last post by:
Sorry for the confusing thread title, I wasn't sure how to call this. This is my issue: I design most of my sites with a single index.php file that takes parameters to decide which pages to...
5
by: pittendrigh | last post by:
There must be millions of dynamically generated html pages out there now, built by on-the-fly php code (and jsp, perl cgi, asp, etc). Programatic page generation is transparently useful. But...
2
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4. In our php.ini file we have notices and warnings turned off. However, I would like to enable them for a small subset of pages. I know the pages specifically, but I...
9
by: invertigo | last post by:
Hello, Im using this .htaccess file to rewrite my websites URL. Reason i try to do this is to make it more SEO friendly. Code: -------------------------------------------------------- Options...
23
by: Geoff Cox | last post by:
Hello, Is it possible to use php to generate different menus for users who have access to files in different folders? For example, user Fred might be able to access files in folders A, B and...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.