[thelist] mod_rewrite for 404 files
Timothy J. Luoma
lists at tntluoma.com
Thu May 6 13:56:30 CDT 2004
Thanks to someone on this list, I have the following in my .htaccess
RewriteEngine on
RewriteBase /ethan
RewriteRule /daily(/([0-9]+)?)?$ ddoe.feeder.php?$2
what I would like to do now is extend this to cover any other files that
are 404 not found (I can't use a proper ErrorDocument in htaccess, else I
would).
If a page is requested and not found, I would like to return the content of
http://tntluoma.com/admin/error_docs/404.php
but retain their original URL in the addressbar (i.e. the place where they
type/input the URL), so if they asked for /foo they still see /foo not
/admin/error_docs/404.php
If possible and not too difficult, I would love to extend the
functionality to include:
asked for: mod_rewrite checks for
--------------------------------------------------
foo /foo/
/foo.php
/foo.html
Every time I try to add something to the above, it ends up making the
above not work, so I'm basically a mod_rewrite idiot looking for some
advice, even if it's just a "MOD_REWRITE FOR DUMMIES" reference somewhere.
Thanks for your time
TjL
More information about the thelist
mailing list