htaccess with mod rewrite problem
Posted: Mon Nov 10, 2008 12:41 pm
i'm trying to set up a 404 custom error page. i already have mod rewrite on, and i'm using some code for the htaccess file that came with cmsms. i've tried adding the ErrorDocument 404 command at the begining of the document and within the tages, but it just doesn't work, as if it's not there at all. what's wrong with this code?
Code: Select all
ErrorDocument 404 /error/page-not-found/
# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off
#
Options -Indexes
ServerSignature Off
Options +FollowSymLinks
#
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /websitems/
RewriteBase /
#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>