No matter how many time I delete the .htaccess, it is still there. Does anyone know how I can get rid of this script permanently ? Thanks
Files starting with "." are recognized as hidden files in linux. In few latest CentOS and Redhat (4/5), they are not directly removable. To remove this file rename it to something like htaccess.old and then remove it. Otherwise, it will still recognize it as a hidden file and oppose you from deleting it.
Mine is cPanel X. Yes I have deleted it from FTP but still show up on the server. Thank mellow-h, I followed your instruction but the file is still there.
If then change the permission to 777 after renaming it (Rename something like google.php) and void its content. Then delete it again. Let me know how does it go.
I upload a file as _htaccess then rename it to .htaccess and then delete it, because it doesn't show up to be able to be deleted.
another option is if you have SSH access to your site open .htaccess in vi like vi .htaccess then delete or better ###UNcomment the lines to disable all .htaccess content uncomment might be better option - there might be a later need for the file again. there is almost no site that runs without .htaccess unless you have all in your apache default config file.
If he goes trough ssh it's better to remove .htaccess like: rm -r .htaccess He don't need to edit it especially with vi, becouse he must be able to save changes after edit with vi and of course he must leave the vi editor, considering that he has trouble with deleting this file I think he isn't well with vi as well
Did the rename create a copy (ie .htaccess was still there along with the new name htaccess.old) or did it actually rename it? If it did rename it, i would say leave it as a renamed file for the moment so it is out of play. If it created a copy, I would start to think that maybe the host has some kind of restriction. I just switched a microsoft package to linux on 1and1 and they put a .htaccess file into the root. All it had was non www to www redirect.