====== Rename files tricks ======
Here we have two tricks which can save you from renaming all files and/or changing links in your navigation menus. You don't need to apply both tricks, one is enough.
===== Force PHP in .html pages =====
To force web server to process PHP code in .html files, you just need to create blank text file, name it **.htaccess** and place it in your web server's root folder (usually named htdocs/ or public_html/) and place following lines in it. If such file already exists, just append following code at the end of it:
AddType application/x-httpd-php .html .php .htm
^ :!: Note ^
| This trick saves you both from renaming files and changing links in your website navigation. In other words, if you do this you will make Instant Update available in both .html and .php pages. |
===== Keep links =====
To force old links to point to new files (e.g. you have //contactus.php// file but you want link to //contactus.html// to actually open //contactus.php//), create blank text file, name it **.htaccess** and place it in your web server's root folder (usually named htdocs/ or public_html/) and place following lines in it. If such file already exists, just append following code at the end of it:
RewriteEngine On
RewriteRule ^(.*).htm[l]?$ $1.php [L]
^ :!: Notes ^
| This trick saves you from changing links in your website navigation. Still you need to rename all files and change their extensions from .html to .php, but you don't have to change website navigation links. |
| You can't use this trick if you are using [[usage:auto_menus|automatic menus]] with [[usage:seo_urls|SEO links]], and really there is no need to use it in that case. |