.htaccess
htaccess (Hypertext Access) is the default name of Apache's directory-level configuration file. It provides the ability to customize configuration directives defined in the main configuration file. The configuration directives need to be in .htaccess context and the user needs appropriate permissions (wikipedia).
Examples:
Execute php in html file
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
I used this one for blogger because it generates html using a template.
In the templade I included php for the menu.
Now it executes the php in the html file and the menu is included as you can see.
Make your own errorpages
ErrorDocument 404 http://www.dartcalculators.com/errorpages/notfound.php
ErrorDocument 503 http://www.dartcalculators.com/errorpages/serviceunavailable.php
Redirect to your site without typing www
RewriteEngine on
RewriteCond %{HTTP_HOST} ^dartcalculators.com$
RewriteRule (.*) http://www.dartcalculators.com/$1 [R=Permanent]
Examples:
Execute php in html file
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
I used this one for blogger because it generates html using a template.
In the templade I included php for the menu.
Now it executes the php in the html file and the menu is included as you can see.
Make your own errorpages
ErrorDocument 404 http://www.dartcalculators.com/errorpages/notfound.php
ErrorDocument 503 http://www.dartcalculators.com/errorpages/serviceunavailable.php
Redirect to your site without typing www
RewriteEngine on
RewriteCond %{HTTP_HOST} ^dartcalculators.com$
RewriteRule (.*) http://www.dartcalculators.com/$1 [R=Permanent]

0 Comments:
Post a Comment
<< Home