hi, we have changed our hosting server. on the new server htaccess is not working, it gives 500 - internal server error. How I should make it working?? thanks, Smruti.
A "500 Internal Server Error" is a message much like the common "404 File Not Found" message. You get the latter message in your browser when you try to access a non-existent web page. You get the "500 Internal Server Error" message when you try to run a script with problems. It is one of the most uninformative error messages that can mean anything from an improper upload to a bug in the script. Im going to guess its a file permissions problem or if the site was moved by the new host it could be the mode in which the server transferred the files. 1) Location Did you upload your scripts into the right place? This is not as obvious as it may seem. Some servers are configured to run CGI scripts anywhere. Others will only run it when it is installed in a particular directory. It is not just a matter of creating a "cgi-bin" directory - for example, some hosts configure the server so that it will run scripts only from a particular directory outside the web directory structure (for security reasons). Your web page will still call the script "/cgi-bin/script.pl" but the server maps it to the actual directory. You will have to upload it in the right directory, regardless of what your web page calls it. Find out such information from your web host's documentation. 2) File Upload Mode Did you upload your script in the right mode? Different operating systems have different ways of representing the end of line character (eg Unix uses a line-feed, Windows uses a carriage-return and line-feed pair), it is important that you set the uploading method correctly, so that line-end translation is performed. Re-upload the script, this time making sure that it was uploaded in the right mode. Do not use any auto-detection options. 3) File Permissions Did you change the permissions on your script so that it can be executed on your web server? In most cases, simply uploading the script to the server does not necessarily mean that it can run. On Unix web servers (like Linux, BSD, Solaris, etc), it is necessary to change the file permissions to indicate to the operating system that the file may be executed. If you have a Unix FTP client, set the permission ("chmod") of the file to 755, which allows the script to be executed by everybody. If you are using WS_FTP from Windows, right click the file that you've just uploaded and choose "chmod". You will be presented with a dialog box where you should check "Read, Write, Execute" for the owner, "Read, Execute" for the group and everyone else. 4) Check your error logs.
hii, 1. I tried keeping my code inside the cgi-bin directory. But it did not work. (I have a sub-domain where i have kept the code inside the cgi/bin folder of the sub-domain) 2. which File Upload Mode should be selected? 3. Kept 755 file permissions for the required folder 4. Error log does not show any information except the page on which error occurred and its reference. Pls guide.
File Upload Mode = ASCII Text files, which includes most cgi files are uploaded in ASCII or text mode. Just about all other files should be uploaded in binary mode.
hi, Now if i enable my .htaccess file, its not giving the 500 internal server error but for every link it shows the home page. pls guide. thanks.
Hi, the problem is solved now. The links (where) to redirect were having parameters separated by '/'. When these were replaced like normal query string like 'abc.php?abc=1' it started working. (it was previously like abc.php/abc/1/' ) But I have a query now, will this change affect SEO ranking? why the new server did not respond to my previous code? thanks, Smrutik.