문제

Whenever I create an .htaccess file in a directory it disappears. I am running a VPS at Digital Ocean (I have full control over the server). So I can't see why my .htaccess files are automatically deleted upon creation. I even tried to make the file on my computer and just transfer it to the directory via FTP but as soon as it transfers, it disappears. I checked the log of the FTP transfer and the file transferred successfully. I can't figure this out.

도움이 되었습니까?

해결책

Its because system files are hidden on apache servers... Either select the option to see hidden files if you're using a GUI or type the command "ls -a" if you're on terminal and you should see the files. Any file that starts with a dot is going to be hidden by default. Your .htaccess files fall within the same category.

다른 팁

If you want to be able to view the .htaccess file on the server, make sure you are logged in as the root user, or a user with root level permissions.

Then, navigate yourself to "/home/username/public_html(in my case)" And if you have a .htaccess file uploaded, it should be displayed there.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top