First, the site needs to be on a Linux or Unix server running the Apache web server. This will not work on a Microsoft server. You also need to use a hosting company that allows server overrides using the .htaccess file. Almost all except the extreme low-end hosting companies allow server overrides, but that question needs to be asked before you commit to hosting services.
The .htaccess file can be found in the root directory. It is a hidden file, so you may have to configure the FTP utility to display the file. if the file exists, download it to your PC so that you can work on it. If it does not exist, create the file. You must use a pure text editor when working on this file. You cannot use a word processor. Any errors or embedded code will cause your site to crash with an error 500.
The first method simply tells the server to run all htm and html files through the PHP processor. Just add the following directive to the .htaccess file. There are two variations, depending upon how the server has been configured. Some trial and error testing is required to see which method works with your server configuration.This code should work on most Apache servers that are configured to run PHP as a module.

0 komentar:
Posting Komentar