Is there a way to to upload .htaccess file to local host directories?

S

serplord

Guest
Usually I can upload via ftp or directly from cpanel to a remote/live server but how can I upload the .htaccess files to inner directories within a local development site?

Thanks
 

MrSam_1

Well-known member
Administrative
Trusted Seller
Dec 1, 2018
21,993
25,823
120
Usually I can upload via ftp or directly from cpanel to a remote/live server but how can I upload the .htaccess files to inner directories within a local development site?

Thanks
Just copy and paste the files into the directories on your local machine using File Explorer?
 
  • Like
Reactions: serplord
S

serplord

Guest
Just copy and paste the files into the directories on your local machine using File Explorer?

OK thanks
Just to clarify what it is i'm trying to achieve here - i'm trying to disable php execution. It was always recommended that I add a .htaccess file with:
<Files *.php>
deny from all
</Files>
into the /wp-includes/ and /wp-content/uploads/ sub-directories.

I have simply copied and pasted the file seperately into the two above directories like you've kindly suggested.

I can see now I have a main .htaccess file with all the autogenerated stuff on it and now these two additional files i've created. I'm only a beginner so i'd be really thankful if anyone can tell me:
- Is there any reason why what i've done above will not work? I'm not a php scripter so don't know how to test if php execution has been disabled in these directories or not.
- Is there anyway I can harden my backend further based on the above implementation?
 
Last edited by a moderator:

Forum statistics

Threads
68,391
Messages
903,647
Members
228,317
Latest member
Person05

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu