Jump to content

htaccess


Skylark95

Recommended Posts

Simply put I am having issues linking this sig to my signature here on the forums. It keeps giving me a 403 error.

Anyone know enough about .htaccess files to tell me what I am doing wrong?

This is the .htaccess for the root folder for the website

ErrorDocument 404 /notfound.html
ErrorDocument 403 /forbidden.html
Options -Indexes

This is the .htaccess file for the sigs directory

Options +Indexes
IndexIgnore *.htaccess
RewriteEngine on
RewriteRule ^.*$ -

I can load a directory listing just fine but can't view the image.

Any help would be great. :)

Link to comment
Share on other sites

I know a little about .htaccess. I have used it a little to secure my wordpress blogs. I don't fully understand everything though.

I do know that Options -Indexes disables directory browsing. That could be it. I have read that you can add it for security reasons. My hosting companies server configuration won't even allow me to put that in. I did some testing and if I put in Options -Indexes it does not take and gets commented out in my file and tells me that I cannot overwrite that function. To comment something out in .htaccess files just put a # in front of it with no spaces before or after. I learned this from tip #10 from this website:

http://www.smashingm...ecurity-tweaks/

IndexIgnore *.htaccess is not it because that is just saying hide the .htaccess file when listing the directory.

That brings it down to possibly being this code:

RewriteEngine on
RewriteRule ^.*$ -

I don't think you need that at all. It looks incomplete from all the ones I have reviewed. I say backup the .htaccess files and do some tests. I would removed the rewrite command above save it and see what happens. If that does not do it put it back in and then remove Options -Indexes from the other one, save and see what happens. Add it back in if no changes occured. At least you could pinpoint it down to the one that could be causing it. Just some suggestions. I have some experience with this but I am no expert with .htaccess. There are so many commands you could put in there it is insane. You should see one of my files it has alot in it. I just added and deleted things to experiment with mine and I never permanently broke my site. I did alot of google searches messing with this stuff.

Link to comment
Share on other sites

I am noticing for me that if I link to it, the image does not show, but if I go to it directly without the link then it works... sometimes that is...

Could be intelligent browser caching that notices its the same file request from the same IP/Domain as when you log into admin backend.

I've had something similar happen to me when I was webhosting a college project. It did turn out to be permissions for me in the end so I still think its that even if it might be driving ya mad :P

Can you apply 777 permissions to it and post so we can check it and then scale back the permissions until you get to the relevant level? (I usually deal with windows permissions so don't know what the actual level should be off the top of my head).

Link to comment
Share on other sites

Could be intelligent browser caching that notices its the same file request from the same IP/Domain as when you log into admin backend.

I've had something similar happen to me when I was webhosting a college project. It did turn out to be permissions for me in the end so I still think its that even if it might be driving ya mad :P

Can you apply 777 permissions to it and post so we can check it and then scale back the permissions until you get to the relevant level? (I usually deal with windows permissions so don't know what the actual level should be off the top of my head).

I have to head into work, but I will be sure to try that.

[edit] I put 777 on the image and the directory. Still doesn't appear to work.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...