The .htaccess File

About the .htaccess file for la.plume micro CMS

The system requires an .htaccess file in the website root folder. That's the reason why la.plume micro CMS must be installed on Apache web server, not a Windows server (Windows does not support the use of .htaccess).

Note! The .htaccess file is not a web page but is a special type of invisible file that 'informs' Apache web server how to process requests for web pages. It is vital to the correct functioning of la.plume micro CMS.

The default .htaccess file supplied with the download is as follows:


###
AddDefaultCharset UTF-8

Options +FollowSymLinks
RewriteEngine on

### NOTE! A HASH SYMBOL DEACTIVATES

### OPTION 1 WHEN USED IN "/" (WEB ROOT):
### Activate/deactivate lines 12, 13, 15, 17, 18, 20, 21, 23, 24 as requ'd

RewriteCond %{REQUEST_URI} ^/cms/inc/(menu|list)\.php$
RewriteRule .* - [F]

RewriteRule ^contact$ /contact.php [L]

RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^$ /cms/index.php [L]

RewriteCond %{REQUEST_URI} !^/index$
RewriteRule ^([a-z0-9_\-]+)$ /cms/$1.php [NC,L]

RewriteCond %{THE_REQUEST} ^GET\ /cms/[^.]+\.php\ HTTP/
RewriteRule ^cms/([a-z0-9_\-]+)\.php$ /$1 [R=301,NC,L]

### OPTION 2  WHEN USED IN "/LAPLUME/" (SUB)FOLDER:
### Activate/deactivate lines 29, 30, 32, 34, 35, 37, 38 as requ'd

#RewriteCond %{REQUEST_URI} ^/laplume/cms/inc/(menu|list)\.php$
#RewriteRule .* - [F]

#RewriteRule ^contact$ /laplume/contact.php [L]

#RewriteCond %{REQUEST_URI} ^/laplume/$
#RewriteRule ^$ /laplume/cms/index.php [L]

#RewriteCond %{REQUEST_URI} !^/laplume/index$
#RewriteRule ^([a-z0-9_\-]+)$ /laplume/cms/$1.php [NC,L]
###

The .htaccess file can be used when the system is installed in the main web 'root' or in a (sub)folder named /laplume/ in the main web root. Edit the .htaccess file to suit, by hashing (#) or unhashing lines as indicated. The hashing is initially set for 'root' installation and must be edited if you are installing in a /laplume/ (sub)folder.

DO NOT unhash lines with three hashes (###). They should remain as comments only. Hash or unhash the relevant lines with single hashes only.

If you cannot see the .htaccess file...

The .htaccess filename begins with a dot and may not be visible on your computer. If you are on a Mac it is probably invisible by default. To view it, install textwrangler, a free text editor for Macintosh that displays the .htaccess file.

On Windows you may need to configure your computer to "Show hidden files."

Note! On some shared web hosting accounts, the .htaccess file can't be seen when the root folder is opened in an FTP client. This can often be corrected by enabling server side filtering in the FTP client program and setting the remote filter as -rtaF. The precise details may vary from one program to another.

More about Apache web server and .htaccess is available at WebmasterWorld's Apache web server library »

Comments

No comments posted yet.

Leave a comment

[ comments are pre-moderated ]