SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    Iasi, Romania
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    404 redirecting behavior

    Hi!
    I created a customize 404 error page (missing.html) and I add a line to .htaccess, so it looks like bellow:


    AddType application/x-httpd-php4 .php .php3
    AddType application/x-httpd-php4-source .phps
    Action application/x-httpd-php4 /cgi-bin/php
    Action application/x-httpd-php-source /cgi-bin/php
    ErrorDocument 404 http://www.mysite.com/missing.html

    The problem that I have is that is working only for html file (when I point to http://www.mysite.com/foo.html the redirection works but when I point to http://www.mysite.com/foo.php it doesn't and I get an ugly 500 'Internal Server error').

    Note: the permissions on .htacces were set by
    chmod 644 .htaccess

    Thanks!

  2. #2
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Moved to a more appropriate forum

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  3. #3
    FreeBSD The Power to Serve silver trophy pippo's Avatar
    Join Date
    Jul 2001
    Location
    Italy
    Posts
    4,514
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi zico,
    I didn't use php as cgi ( just to be curios...why did you use php as cgi ? ) but:

    a)
    if you type yoursite.com/foo.php directly does it work ?

    b)
    is it possible for you to have access to the error_log file and tell us the description of the 500 error ?

    c)
    should not it better to use
    ErrorDocument 404 /foo.php
    instead ?



    pippo
    Last edited by pippo; Oct 28, 2002 at 01:22.
    Mr Andrea
    Former Hosting Team Advisor
    Former Advisor of '03


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •