Add better comments when modifying .htaccess file.
-
When writing to the .htaccess file, it would be exceptionally helpful to add a comment that clearly states the purpose of the modification and possibly have a link to a complete description.
Something like this:
# BEGIN WordPress # Use "Month and name" option for permalinks. # (see Settings -> Permalink for more info.) <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /blog/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog/index.php [L] </IfModule> # END WordPressRecently, I imported an XML backup (from a wp 2.8.4 site) to a freshly installed wp 3.3.2 site. I started using the new site and noticed that the .htaccess file of the new 3.3.2 install hadn’t be modified and that the .htaccess file from the 2.8.4 install had been modified. I thought that this was because of some “improvement” in 3.x. Tech support from my ISP thought the same thing. I didn’t realize that my new site was using the default Permalink setting.
Next, I tried to follow the “Using a pre-existing subdirectory install” instructions and it would have helped a lot if I knew how wordpress had modified the .htaccess from my old install.
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_installThanks,
Chuck
The topic ‘Add better comments when modifying .htaccess file.’ is closed to new replies.