![]() |
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
|
RE: Making .html like .php - SnoOpy - 01-11-2016 There are some reasons to do that, as mentioned here: https://encodable.com/parse_html_files_as_php/ However, you should take a look at this "performance consideration": http://stackoverflow.com/questions/7181853/parse-html-as-php Remember, you can change the file extension on the view of users/browsers' address with Apache mod_rewrite RewriteEngine on RewriteRule ^(.*)\.html$ $1.php [nc] So when you access a html-static-look-alike: http://example.com/forum.html, you can't realize you are accessing a PHP app: http://example.com/forum.php RE: Making .html like .php - Littlemaster - 01-30-2016 I like Apache mod_rewrite and nginx rewrite tools. Because sometime we need to optimize a link for SEO, especially the one with parameters like the current page. http://post4vps.com/thread-347-page-2.html But making all php files parse as html may end in bad result, take caution always as it will destroy everything. RE: Making .html like .php - tbelldesignco - 09-20-2020 I can see this like Littlemaster said for SEO optimization, but in my experience I do not have any issue with using mod_rewrite to optimize my page links and having things populate correctly when searching from google or what have you. In my experience, building your software or website with things like SEO optimization, mobile friendliness and web-hooks for apps in mind is always great practice. |