![]() |
Making .html like .php - Printable Version +- Post4VPS Forum | Free VPS Provider (https://post4vps.com) +-- Forum: Geek World (https://post4vps.com/Forum-Geek-World) +--- Forum: Scripting & Programming (https://post4vps.com/Forum-Scripting-Programming) +--- Thread: Making .html like .php (/Thread-Making-html-like-php) Pages:
1
2
|
Making .html like .php - azureweb - 01-06-2016 BIG EDIT! this tutorial haven't worked for me personally! but this .htaccess file worked for me! Download: http://pastebin.com/download/q1mpgzU1 RAW: http://pastebin.com/raw/q1mpgzU1 Pastebin: http://pastebin.com/q1mpgzU1 Hello, Have you ever tested to make 'for example' an blog system written in ".HTML" files? This tutorial will let some of your website visitors to be amazed that's you have login,register,logout,etc... system written in .html CAUTION: I know! a lot of people will understand this thread incorrectly... please be careful this thread let you know how to make .html files execute PHP ![]() So let's start! it's super simple.
Code: AddHandler x-httpd-php .html .htm That's all for the steps ![]() will this disallow .php? No! it will allow PHP to be executed with ".php" ".html" ".htm" BUT! in some Nginx servers it will disallow ".php" So edit the above line with this: Code: AddHandler x-httpd-php .html .htm .php .php5 .php3 while the different is "we've added .php & .php5 & .php3 at the end of the line!" Verifying if it worked!
Thank you & best regards,* create an file and name it "anything.html" .
in this file add: Code: <?php AzureWeb's main CEO & Founder. RE: Making .html like .php - RickB - 01-07-2016 Why on earth would you want this? PHP is PHP. HTML is HTML. Nginx doesn't work with Apache rules/ .htaccess files ![]() RE: Making .html like .php - Han105 - 01-07-2016 LOL PHP is a script language, HTML is the structure website.. but i guess its not possible if u try make login access with html. u will need PHP but for the permanent save, use Database RE: Making .html like .php - azureweb - 01-07-2016 (01-07-2016, 01:08 PM)han105 Wrote: LOL PHP is a script language, HTML is the structure website.. but i guess its not possible if u try make login access with html. u will need PHP but for the permanent save, use Database What I meant to say by all is to add ".html" file-types as an PHP handler, not more... Also @Han105, I didn't meant to say "HTML have a lot of functions as PHP" I just tell you how to run PHP with .html files ![]() RE: Making .html like .php - Mr.Monkey - 01-08-2016 (01-07-2016, 01:11 PM)azureweb Wrote:But isn't it just as easy/convenient to just change the extension? From .html to .php at the end result? Or am I doing something wrong.(01-07-2016, 01:08 PM)han105 Wrote: LOL PHP is a script language, HTML is the structure website.. but i guess its not possible if u try make login access with html. u will need PHP but for the permanent save, use Database RE: Making .html like .php - azureweb - 01-08-2016 (01-08-2016, 01:26 AM)Mr.Monkey Wrote:(01-07-2016, 01:11 PM)azureweb Wrote:But isn't it just as easy/convenient to just change the extension? From .html to .php at the end result? Or am I doing something wrong.(01-07-2016, 01:08 PM)han105 Wrote: LOL PHP is a script language, HTML is the structure website.. but i guess its not possible if u try make login access with html. u will need PHP but for the permanent save, use Database No dear. RE: Making .html like .php - RickB - 01-08-2016 Azureweb, can you provide me some possible scenarios where this would be helpful? I can't imagine a single one! A proper PHP script is written in pure PHP, so why you would like to save it as a HTML is a mystery to me. RE: Making .html like .php - Conan - 01-09-2016 This is entirely stupid. One misconfiguration and those php scripts are public. Those blog systems that has the html extension uses plugins to generate static html to prevent huge load everytime someone browses their site. RE: Making .html like .php - azureweb - 01-09-2016 Guys I agree with it! I just give an tutorial if it's needed only. "Parsing PHP with HTML files" That's only. RE: Making .html like .php - Unixfy - 01-09-2016 I agree with RickB, I can't imagine ANY scenario where you would need this! PHP extensions are just fine for me, and I'm sure its the same for everyone else. |