Hello, new-bie question...

I am using FillZilla to upload my files. I've installed Drupal and immediately notice that the .htaccess files keeps disappearing each time I upload it. I've tried to upload it in ASCII format, etc...but no matter what each and everytime I upload it.. it stays and then it goes bye bye. any ideas? I'm afraid of changing the file from ".htaccess" to "something.htaccess" if the file is not being referred anywhere.

Any ideas? I can't proceed with anything until this is resolved.

thx!

Comments

gollyg’s picture

I know that some hosts have the server set up to not display the .htaccess file for security reasons. You can still upload it and it will work, but you cant download it or view it. Perhaps you could test the existence of the file by putting something in it that would be obvious if it was working - like a password. If the changes are taking affect then the file is actually there - just not viewable via ftp.

helpme@drupal.org’s picture

Hello gollyg, thanks for the response. I am such a novice, I wouldn't even know how to "put a password" into the .htaccess file (if that is what you meant.

Right now I'm pretty sure it may now exist. Reason being, I've installed Drupal in a sub-directory and I've modified the .htaccess file according to Drupal AND STILL my interface is plain text AND all links frommy landing page still point me to the index.html page in the parent directory.

can you clarify "putting a password"?

thanks again.

varunvnair’s picture

Hi,

Your 2nd para "Right now I'm pretty sure it may now ... page in the parent directory" went totally over my head and I understood almost nothing in there. Could you rephrase your problem in a simpler and clearer way?

You have taken an account with DreamHost. Hosting providers usually allow customers to use FTP to upload/download files as well as remotely login into their account.

You use an FTP client (FileZilla right?) to ftp to your account. Similarly you can use telnet or ssh to connet to you account. You will get a command prompt. If you are not familiar with Unix or Linux then think of the old DOS shell. A DOS shell is a command prompt. Putty is a free telnet/ssh client. Use ssh if possible because it uses encryption and therefore is more secure than telnet (which is plain text).

After telnetting/sshing to your account run the command "ls -a" (without the quotes). Have a look at this page to know more about ls. You will see all the files and folders including the hidden ones. In Unix/Linux a file starting with a dot (".") is 'hidden' and not shown unless specifically requested.

ls -a should show you your .htaccess file if it exists. Alternatively you can just type in "cat .htaccess" to see the contents of .htaccess. If the contents are shown then the file obviously exists.

You will have to go to the folder that has your Drupal installation before executing the above commands.

My Drupal-powered Blog: ThoughtfulChaos

helpme@drupal.org’s picture

Hello Varun,

thanks for the help. I'm in the clear (for the time being)!

thx

varunvnair’s picture

I am probably voicing the obvious but consider the following things:

  1. Your host does not allow .htaccess files and deletes any .htaccess files it finds after some time. There are better/easier ways to disallow .htaccess but I am just guessing.
  2. Your FTP client does not show hidden files. Try sshing to your accound and doing a ls -a to see if the file is listed.

I think the file really exists just that it is not visible. Have you tried enabling clean URLs in Drupal? If they work then it means the .htaccess exists and is working just fine.

My Drupal-powered Blog: ThoughtfulChaos

helpme@drupal.org’s picture

Hello Varnun,

Thank you also for your response. You may be right about my host automatically deleting the .htaccess file. As I mentioned I am sing Dreamhost, if you have any experience with them and know how to turn off the auto-deletion that would be helpful.

In response to your suggestions. I am not sure how to "shhing my account" or "doing a ls-a".. I apologize I am not as tech savvy as I wish to be.

If you see my post above to gollyg, the problem I am experiencing has to do with the Drupal plain text GUI AND all links pointing to my parent directory (index.html) file.

Sorry to be a pest. would you have any other thoughts?

Thanks again for your response.

D

Geary’s picture

.htaccess files are fine with DreamHost. They don't delete them or anything. The file should show up in FileZilla--I'm looking at a .htaccess on DreamHost with FileZilla right now.

About the plain text and links: What do you have for the $base_url in your settings.php? If that is wrong it will cause this problem.

The SSH business refers to using a program such as PuTTY to log into your DreamHost account with a command shell, much like the Command Prompt in Windows except you use Unix commands instead of Windows/DOS commands. "ls" is a command that lists the files in the current directory, but it does not list "hidden" files. In Unix/Linux, a file beginning with a dot is "hidden". To get the "ls" command to show hidden files, you se the "-a" option, thus the command:

ls -a

It's just like using this command in a Windows command prompt:

dir /a

helpme@drupal.org’s picture

Hello Geary,

Thanks for the reponse. It was very helpful. I've been able to get things moving along.

Thx

Geary’s picture

Glad to hear it.

I forgot to mention one thing... I have found that Drupal runs fairly slowly in my DreamHost account. DreamHost's MySQL is not very fast. DreamHost has a lot of nice features, but MySQL speed isn't one of them.

tshark’s picture

best way to see if your .htaccess file, is to go into cpanel and then click file manager, go to the directory that you put it in, and then u can edit it there, delete it, or do whatever you want!

elfcurry’s picture

Using cPanel, I can see the file but whatever I do, (rename, move, delete, change permissions) it reappears with the original permissions.

The hosting company says cPanel doesn't allow it to be removed but Drupal installation says I need to delete it so Drupal can put its own.

Previously I installed Drupal in subdirectories but this time I'd like to install in the root so users just need the domain name without anthing else.

What can I do?

gollyg’s picture

you could try to open the file and modify it by adding the contents of the htaccess from drupal. Or perhaps you could try overwriting it with your drupal htaccess? It may simply be checking for the existance of the htaccess file.

I (and many others) use hosts that utilise cpanel, and have never had a problem with modifying the htaccess. Are you sure that it is in the public_html directory and not the actual root directory?

elfcurry’s picture

I found I can edit htaccess in public_html.

One of the two installations I'm attempting is a subdomain and the htaccess file was empty so I edited it to add the text from one of my existing trial Drupals. On installation I still got the error message:

The installation can not be completed:

- You chose to install in the main directory of the domain *******, but there are conflicting filenames, therefore we can not proceed. Following filenames already exist in the main directory of the domain ******** (path="/*******/public_html/").You must manually remove these files before proceeding with auto-installation:
.htaccess

So cPanel lets me edit but not remove or rename it; Drupal installation insists it must be removed. I'm going to have to install both in a subdirectory which makes the url untidy. Any alternatives?

----------

My other new Drupal is to be installed in the root of another domain where the htaccess file already has lines:
AuthName, AuthUserFile & AuthGroupFile
and I assume these need to stay but what else? Where can I get info on what the file should contain so I can merge the existing one with what Drupal puts there? It probably won't let me merge them though as I get the error above.

My existing test Drupal installations (*all* of this is with the same hosting company) are in subdirectories of public_html in a domain and their htaccess files are identical but don't contain those 3 Auth... lines. What else if anything is needed if htaccess goes in the root or a subdomain?

Is this too confusing? Help would be appreciated.

gollyg’s picture

What about installing drupal locally (on your own computer) and then transferring the files to the server. You could open the local copy of your htaccess, copy the relevant bits into the remote copy, and it should all be sweet.

BTW, are you using the cvs version of drupal? Or perhaps a fantastico install? I am a bit confused as to when Drupal is generating the installation error message - this is normally done manually unless you are using 5.0.

US421’s picture

You can use Filezilla to view and download the .htaccess if you go to the view menu item and check "show hidden files".

elfcurry’s picture

Drupal 4.7.3 fantastico installation

I realised after I wrote that last night and had gone to bed, that it's the installation software Fantastico which must be producing the message. I'll look for their support site.

I'm not keen on downloading, unzipping and uploading all the stuff (sounds very slow (on dial-up) and error prone to me) when my previous Drupal installations took seconds and caused no trouble at all. I'd rather install in a subdirectory and see if I can get some auto-redirect thing to work if there really isn't a simpler answer.

reformatt’s picture

Download the latest FileZilla

Solution:
Goto the tab "Server" -> "Force showing hidden files"

Johnnie Walker’s picture

Here's some info on how to view .htaccess files with FTP_Pro

might be helpful:
http://www.eatmybusiness.com/food/2007/04/27/how-to-download-htaccess-fi...