Forum Replies Created

Viewing 16 replies (of 16 total)
  • Forum: Everything else WordPress
    In reply to: WP Fears
    phidauex

    (@phidauex)

    If you were really concerned about accidentally overwriting your custom index.php, here is something you could try (though I haven’t done it myself with WP, though I have with MT, so it might not work exactly like I suggest..).
    You could rename your custom index.php to index.html, and rename the .css file to whatever you want. Change the CSS file reference in index.html, and then set Apache to parse .html files with PHP, using the following directive in your .htaccess file:
    AddType application/x-httpd-php .html
    Now, if you have lots of actual static html files, this is inefficient, because a regular HTML file still gets parsed by PHP. It displays fine, but it wastes a bit of server resources. However, if you don’t have lots of static HTML, then its fine. On my website, for instance, all the files are called .shtml, but they are actually PHP files. Now, when someone views http://www.yoursite.com/index.html they see your PHP page. Now if you accidentally untar over top of the installation, you won’t overwrite your template file or CSS.
    Combine this with the improved permalinks that use mod_rewrite to make the URL cleaner, and people and bots will have no way of telling that its a PHP page, because it will look and behave exactly like static HTML to the user, be they bot or human.
    However, that said, Google doesn’t seem to have trouble with PHP pages and navigating ‘weird’ links and URLs with arguments and things. However, for the cleanest look possible, you can do some tricks.
    peace,
    sam

Viewing 16 replies (of 16 total)