Create Your .htaccess File

chinmay.sahoo

New member
The Zend Framework can work without mod_rewrite in Apache but it requires the manual configuration of the routes. For the purposes of this book, we will assume you are using Apache (see Chapter 1 for two packages that will install it for you if you like).

In the www directory, you will need a file named .htaccess. In it, place these two lines:

RewriteEngine on
RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php



The first one, of course, tells Apache to turn on mod_rewrite for this directory and all of it’s subdirectories. The second line tells mod_rewrite that unless the requested URI is a resource (image, stylesheet, javascript, etc) to route it index.php. The FrontController will take it from there.
 
Login to your cPanel Account.
Click the File Manager icon, located in the Files section.
From the File Manger popup choose "Choose Hidden Files (dotfiles)." ...
From the File Manager popup choose the folder you would like to open, most often the "Web Root (public_html/www)"
Click the Go button.
 
Login to your cPanel Account.
Click the File Manager icon, located in the Files section.
From the File Manger popup choose "Choose Hidden Files (dotfiles)." ...
From the File Manager popup choose the folder you would like to open, most often the "Web Root (public_html/www)"
Click the Go button.

Nice tips Great share
 
Login to your cPanel Account.
Click the File Manager icon, located in the Files section.
From the File Manger popup choose "Choose Hidden Files (dotfiles)." ...
From the File Manager popup choose the folder you would like to open, most often the "Web Root (public_html/www)"
Click the Go button.
 
.htaccess is a configuration file for use on web servers running the Apache Web Server software. When a .htaccess file is placed in a directory which is in turn 'loaded via the Apache Web Server', then the .htaccess file is detected and executed by the Apache Web Server software.
 
Back
Top