Reply to Re: Convert PHP addresses to HTML

Your name:

Reply:


Posted by Ciaran on 10/14/05 16:51

You have two options, both involve messing around with your Apache
config.

The first is to include a rewrite rule in the config that is something
like the following:
RewriteRule ^(.*)[.]html$ $1.php [L,QSA]
Which redirects all requests for foo.htm to foo.php

The second is to tell Apache to process .html files as PHP. Find the
following line in your apache conf:
AddType application/x-httpd-php .php
And change it to:
AddType application/x-httpd-php .php .html

Note that this would mean all .html files are run through the PHP
engine, which will probably increase the load on your server. You can
get fancier and restrict the rule by directory, if that helps.

-Ciaran

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация