404 page

Discussion in 'PHP' started by sudhakararaog, Dec 27, 2009.

  1. #1
    hi

    1.
    i have a .htaccess file in my root directory on unix hosting

    following is the code in .htaccess file

    ErrorDocument 404 /filenotfound.html

    the file filenotfound.html is also in the root directory as the htaccess file

    when i intentionally type a wrong url either if a misspell a file ex= http://domainname.com/filenam.html or a folder ex = http://domainname.com/100
    to test if this is working filenotfound.html is not being called

    any reason why this is happening



    also the same thing with wamp on my local computer, i have a htaccess and also the filenotfound
    in d:/wamp/www however when i misspell the ulr of my localhost, i have noticed in the status bar that the page is being redirected to
    http://linkhelp.clients.google.com and i get a 404 from this website, how can i change this redirection



    2.
    how do i access the php.ini and httpd.conf file from my cpanel, do i need to ask my hosting provider to make any changes or can i make these changes myself

    3.
    after downloading putty and if i have wamp in d:/wamp/www how do i access mysql from the command prompt
    using putty on my local machine

    please advice


    thanks.
     
    sudhakararaog, Dec 27, 2009 IP
  2. ghprod

    ghprod Active Member

    Messages:
    1,010
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    78
    #2
    Hi, please make sure url rewriting module for htaccess was enabled :)

    nb: maybe u can use XAMPP :)
     
    ghprod, Dec 27, 2009 IP
  3. w3goodies

    w3goodies Member

    Messages:
    94
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #3
    1) Try removing the starting slash to make it like this:
    ErrorDocument 404 filenotfound.html
    If it doesnot work either then write full link to filenotfound.html:
    ErrorDocument 404 http://mysite.com/filenotfound.html

    If both doesnot work then your htaccess not seems to be working and there must be any problem in server configuration.

    2) Some hosting providers give access to edit PHP.ini and HTTPD.CONF. Ask them if they allow and give you the paths for these files.
     
    w3goodies, Dec 27, 2009 IP