Problem Changing Code?
-
I want to install a ‘.htaccess’ file in my ‘wp-content/uploads’ folder and add code to prevent the execution of PHP. When I try to save the ‘.htaccess’ file with the code in it a message appears saying you’re about to save in text-only so formatting will be lost. If I change the document type to allow formatting the ‘.htaccess’ file will become a ‘.htaccess.doc’ file type, which I don’t think will work as a HTACCESS FILE type. My first question is will changing a 6-pointed star-like character to a 5-pointed star-like character render the code useless. Here is the code:
<Files *.php>
Deny from All
</Files>Note: I just learned that you’re not supposed to use a word program to edit a WordPress file, only a text editor. This step may preserve the 6-pointed star-like character.
My second question concerns what type of code format to use for the ‘.htaccess’ file. Here are the examples:
1) ‘.htaccess’ file in the root directory has this type of code format:
# BEGIN WordPress
<IfModule mod_rewrite.c>
————
</IfModule>
#END WordPress2) ‘.htaccess’ file in the ‘wp-content/bps-backup’ folder has this type of code format:
order deny,allow
deny from all
- The topic ‘Problem Changing Code?’ is closed to new replies.