Work at Home

Web Design & Programming - Parse .html .cfm .biz-whiz .and .anything-else with PHP :]

vinyl - Jul 09, 2004 - 10:27 AM
Post subject: Parse .html .cfm .biz-whiz .and .anything-else with PHP :]
Add those three lines inside .htaccess file (located in the root folder [public_html, www etc.])

AddType application/x-httpd-php .php .php3 .html .htm .cfm .biz-whiz .and .anything-else

AddType application/x-httpd-php-source .phps .source

DirectoryIndex index.php index.html index.cfm main-page.cfm main.biz-whiz root.and global.anything-else


First line will create custom extensions and assign them to PHP processor - as you can see, you can make custom endings for your web site files easily Smile for instance, you can make www.freelance-help.com/freelance.faq which will act the same as www.freelance-help.com/freelance-faq.php because extension .faq can be easily added to the list of extensions PHP will parse...

Second line means that files ending with .phps and .source wont be executed, instead, their complete source will appear in browser [rarely used, but you may need it]

Third line tells what will be the first file executed in browser, if visitor access root folder - for instance, if I go to www.freelance-help.com apache will try to access www.freelance-help.com/index.php first, then, if index.php not found, www.freelance-help.com/index.html etc. If none found it will report an error (interesting rule because you can make custom "index" pages - naming them completly different and non-standard.

M.
All times are GMT
Powered by PNphpBB2 1.2d © 2003-2004 based on phpBB 21.2d © 2001, 2002 phpBB Group
and by PNTheme 1.2 which uses Theme Graphics by Daz
and by Attachment-Mod 2.3.6