+  woostyandkeas.com
|-+  Technical Discussion» Technical Help.» .htaccess
Username:
Password:
Advanced Search
Pages: [1]   Go Down
  Print  
Author Topic: .htaccess  (Read 185 times)
0 Members and 2 Guests are viewing this topic.
gi joe
Guest
« on: November 09, 2010, 08:03:01 PM »

Anyone got a template for this file.  I've forgotten how to use it but want to use it to block the listing of me sites directories.
Logged
corroded
Humbug Monkee
Pub regular
*******

Good Guy/Gal Points. 73
Offline Offline

Posts: 3916


Shop Smart, Shop S-Mart.


« Reply #1 on: November 10, 2010, 04:56:59 PM »

You can do that with Apache directives, do you have access to that?
Logged
gi joe
Guest
« Reply #2 on: November 10, 2010, 05:42:57 PM »

?

Don't know.  It's on my hosting company, they use cpanel, don't know if it's in that.
Logged
corroded
Humbug Monkee
Pub regular
*******

Good Guy/Gal Points. 73
Offline Offline

Posts: 3916


Shop Smart, Shop S-Mart.


« Reply #3 on: November 10, 2010, 09:11:08 PM »

Put in a ticket to do it, I would imagine you are on a VPS? It really should be off by default anyway.

But...

http://www.ivankristianto.com/web-development/server/howtoturn-off-directory-listing-in-apache-web-server/141/

Does the trick apparently.
Logged
gi joe
Guest
« Reply #4 on: November 10, 2010, 09:16:35 PM »

I'm with Ariotek.  If I raise a ticket for it they'll probably tell me I shouldn't be managing a website if I can't manage it myself.  They've been that sarcastic before.  Fuckers.  But can't complain as they are cheap, and because they are a small unit their customer service is actually 100%, but as they are geeky they are sometimes sarcastic with it smile

I'll have a look at that link, thanks smile
Logged
corroded
Humbug Monkee
Pub regular
*******

Good Guy/Gal Points. 73
Offline Offline

Posts: 3916


Shop Smart, Shop S-Mart.


« Reply #5 on: November 10, 2010, 09:25:28 PM »

I find 'I need this for [technical reason]' tends to work quite well for that.

Really, the I want it off for security reasons should do. If they are that sarcastic when dealing with a civil request, about something that... say... should be off, maybe you know why they are cheap... cos they are a bit pony =]

This said, a company I deal with today managed to completely misread a bug request... and fixed something to a broken state, and didn't fix the broken thing. So it's now actually... slightly more broken than it was.
Logged
gi joe
Guest
« Reply #6 on: November 10, 2010, 10:25:09 PM »

Nice.

I posted on their forum once that maybe it's because they are Scottish (they are based in Scotland).  That joke didn't go down too well smile they deemed it racist smile

Tits.

I think Keasy or Wooster use them as I think they were the ones I recommend once.
Logged
gi joe
Guest
« Reply #7 on: November 10, 2010, 11:06:21 PM »

Put in a ticket to do it, I would imagine you are on a VPS? It really should be off by default anyway.

But...

http://www.ivankristianto.com/web-development/server/howtoturn-off-directory-listing-in-apache-web-server/141/

Does the trick apparently.

Thanks.  Wasn't sure abotu the Apache bit.  Found it in CPANEL but still not sure.  Followed the link, still not sure but basically done what it's said now I believe.  Just create a .htaccess file and only stuck

Options -Indexes

in it.  And that seems to have done the job.

Thanks.
Logged
digidix
Business Class
From a glass
****

Good Guy/Gal Points. 20
Offline Offline

Posts: 793



WWW
« Reply #8 on: December 04, 2010, 11:33:05 PM »

Is that all?

 scratchhead

Quote
Options -Indexes
Logged
gi joe
Guest
« Reply #9 on: December 05, 2010, 12:09:24 AM »

Is that all?

 scratchhead

Quote
Options -Indexes

Appears so.  File has to be called .htaccess

Logged
digidix
Business Class
From a glass
****

Good Guy/Gal Points. 20
Offline Offline

Posts: 793



WWW
« Reply #10 on: December 05, 2010, 11:07:44 AM »

Is that all?

 scratchhead

Quote
Options -Indexes

Appears so.  File has to be called .htaccess



Yeah, I know that file, tells where the php directory is
Logged
gi joe
Guest
« Reply #11 on: December 05, 2010, 07:26:47 PM »

I don't know about that.  I'm no expert but just assumed it was an access control file.  You can put other stuff in there to password protect folders.  php files don't need to be in the directory its in.  You can use it on any plain, non php website too.
Logged
corroded
Humbug Monkee
Pub regular
*******

Good Guy/Gal Points. 73
Offline Offline

Posts: 3916


Shop Smart, Shop S-Mart.


« Reply #12 on: December 06, 2010, 03:34:35 PM »

Is that all?

 scratchhead

Quote
Options -Indexes

Appears so.  File has to be called .htaccess



Yeah, I know that file, tells where the php directory is

actually, that's http.conf

I don't know about that.  I'm no expert but just assumed it was an access control file.  You can put other stuff in there to password protect folders.  php files don't need to be in the directory its in.  You can use it on any plain, non php website too.

They generally inherit through to sub folders, but if you put one in a lower directory, it takes precedence over the parent .htaccess. Though, it's a bad idea to put them in too many directories, especially upload directories, someone could theoretically overwrite the .htaccess... certainly if it had the wrong permissions on it... and with some bad file type validation, have them uploading php files, or whatnot.
« Last Edit: December 06, 2010, 06:23:14 PM by corroded » Logged
Pages: [1]   Go Up
  Print  
 
Jump to: