n92
n92

Reputation: 7602

How to upload .htaccess file using ftp

I have tried to upload .htaccess file on server, ftp gave me "critical file transfer error" and then i renamed it to "htacces" then i uploaded, after that i was not able to rename it to ".htaccess" , it is giving me "550 denied on server. your restricted to your account ftp" error. so how to do this.

Upvotes: 0

Views: 2715

Answers (2)

itspoma
itspoma

Reputation: 896

try upload php-script createhtaccess.php with code:

file_put_contents('.htaccess', 'Deny from all'."\n".'Allow from all');

and just run him from web

or even upload this-is-not-htaccess.txt with .htaccess content, then upload php script:

file_put_contents('.htaccess', file_get_contents('this-is-not-htaccess.txt'));

Upvotes: 0

Zhianc
Zhianc

Reputation: 1451

You should contact your hosting provider about this matter. You FTP account maybe limited to some actions.

Upvotes: 2

Related Questions