Place your text ad here.
World class Hard Drive Recovery and renowned raid recovery services
WestNIC provides reliable web hosting services
Free software downloads and drivers download resources
This FAQ is part of the Code Style Help and FAQ section. Use the help request form below if your question is not answered here, but make sure you are asking the right question first.
.htaccess file syntax?
A: If you are used to working with HTML documents on your hard disk, the way you organise HTML on a public Web host is not much different. You will need to find a Web hosting service that provides the level of guidance and support you require. Many Internet Service Providers (ISP) offer free Web space for customers and this is a good place to start.
Ask your service provider for details of how you access your Web space. They will usually provide a user name, password and the name of a host computer for you to connect to and upload your Web pages. The host computer is permanently connected to the Internet, has a hard disk to store your Web pages and a Web server program running on it. The Web server handles requests for your Web pages and sends back a copy of the HTML.
To log in to your Web space and upload your HTML, you will also need a File Transfer Protocol (FTP) program. Some HTML editors have FTP programs built into them, but there are many stand-alone programs available on the Internet too. FTP programs usually have a configuration panel for you to enter your user name, password and host name and will connect and log in to your Web space at the click of a button. Graphical FTP programs typically display the folders and files on the Web host alongside those on your hard disk and allow you to drag and drop files from one to the other.
Transferring files to your Web space should only take a few seconds. Once complete, the HTML should be accessible using your Web browser.
There are a many further details to learn after you have got used to these basic file transfer procedures. One important thing to remember when you are testing your Web pages is that you must always upload changes to your local copy to see the differences.
A: DNS is otherwise known as a Domain Name Service, which is provided by a Domain Name Server. These name servers are part of the Internet infrastructure and share information amongst each other about where to locate servers by domain name. They take a domain name and find the Internet Protocol (IP) address for the host where it is registered, so that client requests can be routed to it.
More details available to subscribers:
What is meant by DNS name server?
A: This error means that the Web server expects to find your login page at this file path, but it is not there. This may be because the Web server has been configured with the wrong base directory for your Web site as a whole, or this page in particular. Perhaps the Web server is configured with the correct base directory, /home/~user/htdocs, but the login page is simply not present, it may not have been uploaded?
A: It sounds like this site may be using basic authentication realms, where authentication information is passed in the HTTP headers for the protected area of the site. If so, your browser will maintain its authenticated status until it is shut down.
More details available to subscribers:
When I log out, I can still go back to the password protected pages!
A: Standard Web server logs may include the IP address of clients and how many requests they make. Log files are usually generated in a plain text format and your server configuration should include options to customise the fields that are recorded.
More details available to subscribers:
How do I get the IP address of visitors to my Web site?
A: No, there's really nothing you can do for people who already have your old stylesheet in their cache and re-visit your site. Their cached copy will be saved with whatever cache settings your stylesheet had at the time and not necessarily refreshed.
More details available to subscribers:
Can I purge all cached copies of my old stylesheet?
A: Yes, you can suggest this is done by an HTTP conformant browser, but it's generally a bad idea to do so. If your users have to load a fresh copy of the stylesheet from the origin server for every page, you're severely diminishing one of the primary powers of external stylesheets; improved site performance. It would also put a considerable hit on your Web server's performance and host bandwidth.
More details available to subscribers:
Can I force a stylesheet to be reloaded?
A: The recommended minimum character set for XHTML is UTF-8, which can be set as part of the content type directive in the relevant .htaccess for a site or document directory, as follows.
More details available to subscribers:
How do I configure the character set for XHTML with Apache?
.htaccess file syntax?
A: If you have installed Apache, you will find lots of documentation in the htdocs sub-directory, in directory called manual. This .htaccess files tutorial introduces the subject.
A: Without further details it is difficult to say what the server error is, but it is likely that you have set your favourite site as your Apache server host name. Somewhere in your httpd.conf file you may have a line such as:
ServerName: example.com
More details available to subscribers:
I get a 500 Internal Server Error for my favourite Web site!
A: The purpose of the 403, forbidden, error is to control access to Web resources. To overcome an unwanted 403 error you must reverse this situation. If you have problems accessing a particular file or directory, ensure that the Web server has permission to read those files. Usually, the Web server will operate under a special user account, so make sure that user has read permission.
The second most likely case is that you have requested a virtual directory URL that has no index document and is not configured to list the contents of the directory. In this case, either create an index for that directory or change the settings to permit directory listings. For Apache, use the Options +Indexes directive in the .htaccess file for the directory. This in turn relies upon overrides being enabled in the main http.conf configuration, see Custom error 403, access forbidden.
A: The HTTP error 400, bad request, means that the Web server received a request that it could not process, because it is not configured to do so, or because it expects certain headers or parameters in the request that are not present.
More details available to subscribers:
Why do I get a 400 error?
A: The first thing to consider is why you're getting a 400 error and decide whether it is the best response to give for a particular request. In some cases, 400 is the best response to give and you should stick with it. For instance, many servlet applications give a 400 response if the request parameters have evidently been edited to make a request that is not permitted for security reasons.
More details available to subscribers:
How do I correct a 400 bad request?
A: This error means that the Web server cannot find a default home page for the intranet site you requested. When you make a simple domain request like http://intranet without a URL path, the Web server cannot tell what specific document should be returned. In this case, the server should normally be configured to send a default page, such as index.htm, rather than show an error page.
This problem also applies to virtual directory paths like http://intranet/example. Ideally, hyperlink URLs should include a specific file path at the end, such as http://intranet/example/index.htm, but one cannot rely upon people to type full URLs into their browsers.
The Apache Web server's configuration file httpd.conf normally has a DirectoryIndex directive, as below, to specify the default index page to use in these cases, listed descending priority order.
More details available to subscribers:
I get "Object not found!" on http://intranet!
A: This error code is puzzling. According to the HTTP specification, this code is reserved for future use and means "Payment required". It sounds like your Web server is incorrectly configured or you have keyed the wrong figure into a server side script or servlet.
A: The point of custom error pages is to help the user first and the developer or publisher second. One hazard with sending an automatic email error report is that it may make the problem worse. If you catch an HTTP 404, document not found error and the email script produces a 500, internal server error, the user may not appreciate the difference, and you will get confusing error reports.
This is not a major risk, but worth testing thoroughly to check what happens when the mail server is down, the email address is invalid, or HTTP request headers are missing, for example. If your custom error page looks up the HTTP referer header and the user's browser has this option switched off, what then?
A: It is difficult to diagnose problems like this without more detailed information, but it sounds like you may already have an Apache HTTP service running on your machine. One of the options during the Apache installation is to create a system service to run the server automatically as a background process. In this case, the service instance of the server will already be listening on the default port 80 and hold the lock on the server logs, which may give the errors you describe.
One way to check if Apache is already running is to press Ctrl + Alt + Del and choose the Task Manager option, then the Processes tab. The Apache service will normally be listed as Apache.exe if it is running. Of course, you can also request the local host URL http://127.0.0.1/ in your Web browser to see whether any service is running.
| Front-end FAQs | Back-end FAQs | Learning Java |
|---|---|---|
See site help for questions about this site, our text ads and sponsored links services.