Make Dynamic URLs Search Engine Friendly - Upload .htaccess to Your Server
(Page 4 of 7 )
Now that you have created the .htaccess file you need to upload it to your server. It must reside in the same directory as the page that invokes your dynamic URL. Likewise, the script that is invoked should be in this same directory. In our example we use the root directory of the server.
If you are only familiar with file naming conventions under Windows the name of this file will strike you as odd. Why start a file name with a dot? On Unix/Linux systems files of this type are hidden. For this reason you need to make sure your FTP program is set up to view hidden files. Usually this is done using a site configuration option. With my FTP program I need to enter -al into a Remote File Mask textbox. If you can’t configure your FTP program, most operating systems have an FTP utility that is invoked by typing ftp at the command line. Once you’ve connected to your site, to view hidden files you need to list them using the -al option. This is done by typing ls –al. This is an important point because you want to able to see your file on the server, especially if you are using a graphical program to transfer it. If you successfully transfer it and it’s not correct you won’t be able to see it to delete it. Be warned that a misconfigured .htaccess files can make your site inaccessible from a browser.
Make sure that you transfer your file in ASCII mode. When automatically transferring files, most FTP programs determine the transfer mode by looking at file extensions. Under Windows this may mean that a file named .htaccess will transfer in binary mode. Configure your software so that files with this extension will upload as text files or, alternately, transfer the file manually.
Next: Test the Results >>
More Web Services Articles
More By Peter Lavin