01-12-2009
deny directly allow indirectly (.htaccess)
I am running apache web server on CentOS5.2
I have the directory in which stores a lot of images.(/var/www/html/images)
I want to deny everyone from directly accessing the directory but still allow images in the directory to be used by HTML (/var/www/html/pic.html <img src="https://www.unix.com/images/hotimg.jpg">)
=>someone cannot access that specific directory directly.
1)create .htaccess in images directory
2)type following lines and save
order allow,deny
deny from all
but I don't know how to allow images in the directory to be used by HTML(pic.html <img src="https://www.unix.com/images/hotimg.jpg">)
thanks in advance
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
For a schoolproject, I have to set up an intranet at a company headquarters in the Netherlands. But they want to give the division in the United States access to that intranet.
I have to find out how to do that. I've heard that you can do that by giving certain people access to the intranet with... (1 Reply)
Discussion started by: Puc conDoin
1 Replies
2. UNIX for Dummies Questions & Answers
i want to protect a folder on my HP....
does the folder need more than ".htaccess" and ".htpasswd" to be protected , and ask for login and password???
Please help ......
i use HTAdmin 1.2.1 to manage my access files..
The systemadmin cant or wount answer.....:confused:
Avenger (3 Replies)
Discussion started by: Avenger
3 Replies
3. Cybersecurity
Something is wrong. I do everything right make the .htaccess file and stuff, but when I try the htpasswd command it says command not found. I use Putty SSH client and I think server is running RedHat 7.1 with Apache some version.
HELP!!! (1 Reply)
Discussion started by: _hp_
1 Replies
4. Cybersecurity
hi i am trying to make a log of all users who access my website, i am using htaccess to administrate logins, how does htaccess store a session i.e where is the valid user login temporarily stored while a user is using the site or is there already some sort of logging being done by htaccess.
... (2 Replies)
Discussion started by: omnibarb
2 Replies
5. UNIX for Dummies Questions & Answers
Can someone please tell me how to ssh into a computer when I have a username and password? Like something like:
ssh username : pass @ server
Can I do something like that directly? (6 Replies)
Discussion started by: Legend986
6 Replies
6. UNIX for Advanced & Expert Users
Hi,
I would like to use htaccess 301 redirect with URL hiding.
Ex:
when browse the website 'abc.com' it should show the contents of the page 'xyz.com/start/index.html' but in addressbar should show the domain 'abc.com'. I know it works with html URL frame rewrite. But my question is it... (0 Replies)
Discussion started by: chandranjoy
0 Replies
7. Web Development
I have the following directive in my .htaccess:
#RewriteRule ^mozrank/?$ "http://www.seobook.com/#a_aid=dh"
The problem is that the redirect is going to
http://www.seobook.com/%23a_aid=dh
How to preserve the # when redirecting? (2 Replies)
Discussion started by: rlopes
2 Replies
8. Shell Programming and Scripting
How do I download on a link doing it indirectly, with once redirection by using curl commands or Bash script of them (2 Replies)
Discussion started by: abdan
2 Replies
LEARN ABOUT DEBIAN
mrtg-webserver
MRTG-WEBSERVER(1) mrtg MRTG-WEBSERVER(1)
NAME
mrtg-webserver - hints for web server configuration
SYNOPSIS
If you want people to actually see the results of your network monitoring efforts you will need a webserver.
This document lists some configuration hints for webservers. Contributions welcome.
APACHE
Configuring mod_expire
A big issue with mrtg monitoring data is the expiry time. All these nice graphs you can create are only valid for a short time. If you do
not take special action some webbrowsers will not notice this and you may end up with people seeing old data because of caching issues.
The apache module mod_expire allows you to setup special expiry properties for individual file.
Here is an example for how this may look for an mrtg web directory. The configuration directives can be stored into a .htaccess file.
############################################################
# Example .htaccess for use with apache-1.2 and mod_expire.
# (mod_expire come with apache-1.2 but you have to explicitly
# activate it when compiling the httpd ...)
#############################################################
#
<Files "*-day.png">
ExpiresActive On # enable expirations
# five minutes
ExpiresDefault M300
</Files>
<Files "*-week.png">
ExpiresActive On
ExpiresDefault M1800
</Files>
<Files "*-month.png">
ExpiresActive On
ExpiresDefault M7200
</Files>
<Files "*-year.png">
ExpiresActive On
ExpiresDefault M86400
</Files>
<Files "*.html">
ExpiresActive On
ExpiresDefault M300
</Files>
# index.html is not automatically generated
<Files "index.html">
ExpiresActive Off
</Files>
AUTHOR
Unknown
2.17.4 2012-01-12 MRTG-WEBSERVER(1)