Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

.htaccess

SpaceshipSpaceship
NamecheapNamecheap
Namecheap AuctionsNamecheap Auctions
Watch

D@Z

Established Member
Impact
0
Recently I've been looking up .htaccess to protect my content which is in folders on my host.

I followed a tutorial online that showed me how to deny all IP address apart from my own. This caused a big problem. It worked - but images then would not work on my website and people could not link my button etc.

This also happens to me when I password protect my directories via cPanel. Is there an easy way of doing this?

I basically want all my folders forbidden to everyone apart from me, yet the images or whatever content is in the folder still shows on the webpage.

Thanks very much for your help!
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Turn off the index of folder by using Index Manager on CPanel.

Use robot.txt to disallow spider crawl your folder.
This is an example:
Code:
User-agent: * 
Disallow: /administrator/
Disallow: /cache/

===
If you use password protect, then all content inside is forbidden for whom doesn't the password.
 
0
Close
aint robots.txt just there for search engines? i may be wrong but..
 
0
Close
i went into Index Manager in cPanel and put it as "No Index" on my folders. I then visited my folders and a 403 Forbidden message shown. Hopefully this will work for everyone.

thanks very much for your help!
 
0
Close
xtreme-forums said:
aint robots.txt just there for search engines? i may be wrong but..
Yes, in fact there are two steps, turn off directory indexing, and use robot.txt

If you don't use robot.txt , then someone can steal file (example .psd file) on your directory using Google.
 
0
Close
how exactly do they do that?
 
0
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back