Forum Moderators: coopster
I can't work out how to stop this, can you help.
I'm hosting with 1and1 and have created an .htaccess file which correctly sends missing page lookups to a specified page, but if the missing page ends with .PHP .PHP5 .PHP4 a generic 1and1 page appears and ignores my ErrorDocument.
Perhaps there needs to be something extra in the .htaccess file?
If you can email me I'll send you a working and failing url so you can see.
....
My .htaccess file below:
#
# .htaccess (site root directory)
# Apache & PHP Settings
#
# Protect files and directories
#order deny,allow
#deny from all
# Options
#Options FollowSymLinks
# Re-direct Site Errors
ErrorDocument 400 /error.php?errordoc=400
ErrorDocument 403 /error.php?errordoc=403
ErrorDocument 404 /error.php?errordoc=404
ErrorDocument 500 /error.php?errordoc=500
# Tell 1and1 to use PHP5 by default
AddType x-mapp-php5 .php
# Save Bandwidth
# 1and1 not functional
#<ifModule mod_php4.c>
#php_value zlib.output_compression 16386
#</ifModule>
# Rewrite URLS
# note: [NC] nocase (case insensitive)
# prefix z makes the items more unique
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^zcat(.*)_p(.*)_size(.*)$ item_cat.php?cat=$1&page=$2&image_size=$3
RewriteRule ^zcat(.*)_p(.*)$ item_cat.php?cat=$1&page=$2
RewriteRule ^zcat(.*)$ item_cat.php?cat=$1
RewriteRule ^zinfo(.*)_cat(.*)$ item_info.php?item=$1&cat=$2
RewriteRule ^zinfo(.*)$ item_info.php?item=$1
RewriteRule ^friend$ index?refer=friend
</IfModule>