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.

    1. Do you have any mod_rewrite being done in the .htaccess file as well? Are you sure the .htaccess file is being processed (e.g. can you make some other change and verify that it's being applied)? Does http://domainname.com/filenotfound.html show the page you expect it to?

    As for the redirection, sounds like it could be a browser issue. I'd recommend using telnet or something similar (PuTTY, for example) to connect and test out the misspelled URL. That way you can see the server response, unadulterated by any "helpful" browser feature. I believe there's also a plugin for FireFox that does this, if you use that browser.

    1. Not sure about this one. I don't use cPanel so I'm not familiar enough with how it allows you to change configurations and whatnot. As such, you'd probably get the best answer straight from your hosting provider (since it is their server/setup, after all).

    2. You don't use PuTTY (or any terminal program) to access a MySQL server; you use the MySQL client for that.

    If the MySQL 'bin' directory was correctly added to your system's PATH environment variable, then you simply need to open a command prompt and type 'mysql' - that should launch the MySQL client CLI. Note you can also specify paramters, e.g. "mysql --user=root -p" tells the client to prompt for a password to use when connecting with the username 'root'.

    Type 'mysql --help' (or look online in the MySQL documentation) for more information about the parameters that the client CLI accepts.

      thanks for replying

      about the 404 page i have fixed it by specifying the absolute path to filenotfound.html instead of using relative path

      when i typed mysql at command prompt i got an error

      mysql is not recognised as an internal or external command

      please advice.

      thanks

        If you are talking about using a mysql server running on localhost, the path to the binary must either be added to the path environment variable or you will have to specify it manually each time.
        e.g.

        c:\mysql\bin\mysql.exe --user=root -p

        If you want to add it to the path environment variable, you need to edit autoexec.nt iirc. But I don't remember where it's found. Probably c:\windows\system or c:\windows\system32. Just add a new line at the end of that file like this

        path=%path%;c:\mysql\bin

        If you want to connect to a mysql server running on a remote host, you can either do the above and specify the ip address or host name to connect to. mysql -? for more info on how to do this. But this requires that the server allows your incoming connection, which is far from certain.

        SSH is more likely to be available to you. In this case, I'd recommend downloading the SSH addon for windows that lets you use it from the terminal. As described above to run mysql, start a new terminal, then just type "ssh -l username example.com" (without quotes) and remember that you can't connect as root.
        Once your ssh connection is established, you run mysql on the remote machine just as if you were running it locally, i.e. mysql --user=username -p

          Write a Reply...