473,603 Members | 2,603 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ph p" 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 1747
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.ph p" 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.ph p" 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_FILEN AME} !-f
RewriteCond %{REQUEST_FILEN AME} !-d
RewriteRule (.*) abs_uri_of_your _error_doc
RewriteEngine On
RewriteCond %{REQUEST_FILEN AME} !-f
RewriteCond %{REQUEST_FILEN AME} !-d
RewriteRule (.*) uri_of_error_do c
RemoveType x-mapp-php4 .html

#html files
ErrorDocument 404 uri_of_error_do c

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
5687
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 recently validated my site's css and the bulk of the html pages via the W3C validator but was forced to use the file upload option because the 'Validate by URL' option returns the following error: >>Sorry, I am unable to validate this document because...
67
5984
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 makers in the world. He gets (sic) close to $5000 per custom made flyrod. A surprising number of people buy these fishing rods and never use them....they buy them as art-like investments. He is, after all, the best there is. But if you search on...
29
4843
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? Here is an exsample of url that google register, that might make is more clear what is happening www.winches.dk/winches.php?artnr=500735&PHPSESSID=d22126f0d46334659ff...
1
1352
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 include: something like www.blabla.com/index.php?dir=a&page=b which will include some file in say ./a/b.html, but will have all the headers and footers that are defined in index.php.
5
3155
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 querying a database, negotiatinig lots of if-then-else logic and echo'ing html code out on port 80 every time a page is requested has to be a huge waste of resources. Why not use that logic to print static html instead of dynamic?
2
2633
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 would also settle for enabling notices and warnings for a certain directory. Is this possible, and if so, how? Thanks, - Dave
9
4388
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 +FollowSymLinks RewriteEngine On RewriteBase mywebsite.awardspace.com
23
2388
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 F, whilst use Jane might be able to access files in folders A, D and E. I would want each user to only see text and links relevant to the files in their chosen folders...
10
6955
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 of section c. Not sure where went wrong as the web page displayed internal server error. Also, what is the error 543? and error 2114. Where to find the list of errors in websites as it is not the standard apache error. I could not find...
0
7996
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7928
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8060
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8273
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5441
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3903
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1259
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.