1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: I bet there's a web expert who can answer this on .htaccess files

Discussion in 'Web Design & Development' started by plado, Apr 11, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. plado

    plado Thread Starter

    Joined:
    Jul 16, 2004
    Messages:
    49
    I've always had good results on here so I'm going to take a stab at this one. I don't often need to come and ask but this one has stumped me.

    I've changed to a new ISP and they give me a webspace so I promptly put my whole webpage up on the server and it was all working properly except when I put the .htaccess file in the /Gifts folder or in the root folder where the index.htm files are, it wouldn't allow Public access to the folder to download anything.

    I asked the ISP support and they didn't want to give me any but they did say it should work, it isn't banned by us. Try putting
    Options_Indexes instead of Options +Indexes, in the file I called public.htaccess
    This didn't work. Am I doing something wrong?
    Should the syntax be something else.
    I only need to put one folder up there called Gifts and in it from time to time I like to put up a short movie or .mp3 or a photo and even sometimes a .zip with a SlideShow that can be a bit big for email sending so people I give the url to, can go and fetch it.

    Now when you try the url it says "you do not have permission to access these files" or in Firefox Error 403 Forbidden

    Is there a solution out there? I have temporarily registered with box a site that allows file sharing but I'd prefer it on my own site.
    Thanks
    Plado
     
  2. cwwozniak

    cwwozniak Trusted Advisor Spam Fighter

    Joined:
    Nov 28, 2005
    Messages:
    64,256
    First Name:
    Chuck
    Shouldn't that be a file named .htaccess in the public/ sub-directory on your server, as in public/.htaccess ? Or did you just make a typo in your post?
     
  3. Mudley

    Mudley

    Joined:
    Apr 6, 2008
    Messages:
    101
    are you trying to remove the indexes option?
    if so, put Options -Indexes

    the + or - depends on what is already set up for the given directory (as far as merging the options)

    is your htaccess broken out by directories?
     
  4. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,786
    I would check the permissions on the Directory and Files.
    Options +Indexes should work.
     
  5. tomdkat

    tomdkat Retired Trusted Advisor

    Joined:
    May 6, 2006
    Messages:
    7,148
    What is in the .htaccess file on the server right now?

    Peace...
     
  6. plado

    plado Thread Starter

    Joined:
    Jul 16, 2004
    Messages:
    49
    I'll reply to both responses here, because I obviously need to clarify somethings that I didn't explain properly. Sorry about that.
    Let's start with squashman I've just checked my W. S. FTP and I can't see any way of checking directory permissions. There doesn't appear to be a control to do that. I'm no Web author, I just used an HTML Wizard to write my page so I'm not sure how I would write folder access permissions into the page.
    To Mudley I'm not sure what I'm doing with the indexes, I only know that Options +Indexes on my last webpage placed in the Gifts folder that was a sub folder of /Public_html, it allowed visitors to enter the directory tree.
    I'm afraid I don't know what you mean by "merging the options" nor what is meant by "is your htaccess broken out by directories?"

    I only ever required that the folder under /Public_html that I had created that was /Public_html/Gifts was the place where I put files that I want people to be able to fetch just by going to my website and putting /Gifts on the end of the URL but on this new Server I'm with (waitrose.com) it doesn't work. It goes to access denied error. I've tried the .htaccess file put in the Root /Public_html folder, as well as in the /Gifts sub folder and also tried both together.
    I've tried the same combinations with Options_Indexes Options +Indexes and Options Indexes but not yet tried Options -Indexes because before it worked with +Indexes. Again I know nothing about the language used as I don't know what it's doing. I'm just following this by my usual "painting by numbers" and doing what experts tell me to.

    So I'm still in your hands please. Thanks for your help so far.
    I'll be interested to see what comes of this.
    I will persevere, I've got stacks of patience.
    Thanks
    Plado
     
  7. plado

    plado Thread Starter

    Joined:
    Jul 16, 2004
    Messages:
    49
    I just returned to the site and put the .htaccess file amended to Options -Indexes and it still didn't work. I put it in the /Public_html folder.
    I will try it in the gifts folder as well but I think it's not going to work.
    Back to the drawing board.
     
  8. plado

    plado Thread Starter

    Joined:
    Jul 16, 2004
    Messages:
    49
    The .htaccess file contained Options +Indexes but now I've changed it to Options -Indexes but still no go.
    I had got it there as a file named aaa.htaccess because I wanted it to appear in the top of the list, as someone told me that is what you do. But when I changed it once it was on the server to .htaccess it went invisible and so now I can't seem to make it show invisible files. Maybe there's a setting in WS Ftp that can make it display hidden files. Trouble is Windows XP won't let me name it .htaccess with nothing before the dot. It breaks the sacred Windows rule. So I tend to send it up with a prefix and then when necessary rename it on the server - but it will keep disappearing when I do that. What a rigmarole!
     
  9. tomdkat

    tomdkat Retired Trusted Advisor

    Joined:
    May 6, 2006
    Messages:
    7,148
    You should be able to change the directory permissions using WS_FTP. Per this WS_FTP doc, what happens if you right-click on the directory name on the server (while in WS_FTP) and click "FTP commands"? Do you see a "chmod" menu option?

    EDIT: With regard to naming .htaccess without anything before the dot, you CAN create files named this way on Windows XP. You just might not be able to do it using whatever application you're using to edit it. I just created a ".htaccess" file on my Windows XP Pro machine using Notepad.

    Peace...
     
  10. plado

    plado Thread Starter

    Joined:
    Jul 16, 2004
    Messages:
    49
    Yes well so far you've got me the furthest forward on this of anyone.
    I can indeed right click the Root file and choose CHMOD
    So I did that and had three columns Owner Group & Other and when I tried to put ticks in WRITE instead of just READ it wouldn't accept and the event window came up in red that I had no permission to change any CHMOD on that folder

    So I went to the Gifts folder below it and tried it there, and put ticks in write against all three columns and it accepted the changes but sadly this didn't result in the folder being accessible and I still have a .htaccess file in there with Options +Indexes set but invisible.

    So I am going to have to sleep on this one for tonight.
    I wonder if there is still a way forward with this? I don't want to waste anyone's time. But it is a challenge for sure.
    Reading the Apache notes on htaccess files I'm afraid I got instant brain-fade.
    I have to pursue a simpler route.
    With thanks for your help so far
     
  11. tomdkat

    tomdkat Retired Trusted Advisor

    Joined:
    May 6, 2006
    Messages:
    7,148
    Ok, the .htaccess file *should* be accessible through WS_FTP when you connect to the server. Are you saying you can't see it?

    This really isn't that difficult. It just appears that way from your perspective. :)

    The first thing I would suggest is simply removing the .htaccess file you've got in the Gifts directory now, see what happens, and then help you build a .htaccess file that will suit your needs. :)

    Peace...
     
  12. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,786
    you cannot name the file aaa.htaccess and expect it to work. Apache is looking for a file named .htacces! Period, no ifs ands or buts.

    You should have no problems creating a .htaccess file with notepad. When you save it, just selecta all files and save it as .htaccess.

    WS FTP has no problems showing filenames that start with a period. I got a ton of them on my account.

    Either you are not doing something correct or your webhost is pulling your leg. Can you give us a link to your Webhost. Are you sure your site is being hosted by an Apache Web Server?
     

    Attached Files:

    • ftp.jpg
      ftp.jpg
      File size:
      87 KB
      Views:
      61
  13. plado

    plado Thread Starter

    Joined:
    Jul 16, 2004
    Messages:
    49
    Ok this is a reply just to answer your points as I know you're working on a solution to this via our (Personal Message) There's no longer any aaa.htaccess up there on the website. But I still can't find how to make visible the .htaccess file I have put there both in the public_html root folder and in the /gifts folder.

    I have changed the default settings in WS FTP to make it send all .txt and .htaccess files over as ascii not binary and resent the .htaccess file to the two folders with Options +Indexes as their only content. I have now, thanks to folks here worked out how to save the .htaccess file with no prefix locally on my windows folder. So that problem is solved.
    But I still can't find a way to make the file show up on the server.
    In fact when I post a fresh one to the server it doesn't throw up the usual "file you are posting is older than the one etc etc" so it looks for all the world like it's pretending to send the file there and it simply doesn't arrive. Maybe it's not there?
    Though I suspected this yesterday and when I posted it as aaa.htaccess I then saw it was there, and changed its name on the server to .htaccess. When I did that it vanished ! Eh? What's going on there then?
    Finally I'm not sure if waitrose.com is hosted by an Apache server. They don't give away that much information. Maybe it's not. So I hope you can discover one way or another if I can achieve my goal or whether I should just give up and crawl away !
    Thanks again for your help.
     
  14. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,786
    You are SOL. I am not sure why you can't see the file. As you can see from my last post, WSFTP works just fine with dot files. I am going to assume this is a Server issue because they are using Windows with IIS. Can't use .htaccess with IIS. Apparently their support people are retards.
     

    Attached Files:

  15. plado

    plado Thread Starter

    Joined:
    Jul 16, 2004
    Messages:
    49
    Ah that's great - thanks for finding that out for me. I don't think I'm completely trashed yet though. There may be a way and I'm working on it with the help of our friend TomdKat who is going to have a look and see what he can do with the file.
    But if I do end up finding out it's impossible then at least I have proved that it wasn't anything I did wrong. Bit of a cheap boost to my ego I know but it's better than thinking my expertise and knowledge was way off the mark.
    Cheers
    Plado
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/702710

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice