kvarnerexpress
May 6 2005, 07:55 PM
| | hi, i want to restrict certain files to be directly accessed in certain directories . These files are supposed to be included in other pages , but i want to restrict people just copy pasting their url's / copy shortcuts and paste them on the browser . is this possible by using .htaccess or something else ? I am on a shared hosting account of course and don't have root access . I would like to redirect the users / or simply restrict access to the file directly . |
Reply
mbd5882
May 6 2005, 09:56 PM
CPanel>Hotlink Protection>Enable Input the addresses that the files can be viewed from. Just keep defult settings. I think this only works on images, Yes-I think? If you add another sub-domain, Stop it, Refresh, Start it again. That new sub-domain is not included if you add it after you enable it.
Reply
clagnol
May 7 2005, 10:22 AM
QUOTE Q. How can I make a directory not list certain files?
A. You'll need to add the following to your .htaccess file:
IndexIgnore *.gif *.jpg
To disallow Directory browsing all together, add this to your .htaccess file:
Options -indexes
To show files in a slightly more beautiful fashion:
Options +Indexes IndexOptions FancyIndexing
Taken from this site. It doesn't specify, but the first command is only hides JPGs and GIFs. You can hide any kind of file, and if you want to hide specific files, just replace the "*.gif" and "*.jpg" with the file names.
Reply
Similar Topics
Keywords : htaccess
- Is Wildcards Allowed In Htaccess?
Requesting help (0)
Help Needed: Rewritting Uris From .htaccess
Making ugly dinamyc URIs look nicer (0) I think this should be easy for someone experienced, but I have never done something similar, so I
need a bit of guidance. I have a mini-site under a subdomain that entirelly relies on dynamic URIs.
All pages have URIs in the form http://towo.dragon-tech.org/index.php?lang...mp;section=news
http://towo.dragon-tech.org/index.php?lang...mp;section=home and so on. The index.php script takes
care of retrieving the appropriate content from both the database and some include files, and
everything is working fine. Only that these URIs look quite ugly on any visitor's....
.htaccess
(3) How do I make subdomains using a .htaccess file? Like "Example.Domain.com" I remember I was able
to make a .htaccess file with some stuff in it that allowed it to do it, but I dont remember how.
any help would be appreciated =)....
Site Management Tools: Look Before You Leap!
The danger of using Index Manager and other .htaccess altering tools.. (3) A few minutes ago I was looking at site management tools section in my Control Panel. The tool
"Index Manager" caught my eye. If I used it, then I wouldn't need to create placeholder pages in
my folders with no index pages /smile.gif" style="vertical-align:middle" emoid=":)" border="0"
alt="smile.gif" /> What I had forgotten is that I already had an .htaccess file in my site.
Needless to say, enabling this option took down my whole site instantly and displayed an "Internal
Server Error" message. How stupid of me! /wacko.gif" style="vertical-align:middle" em....
Dynamic Signature - Yet Another Way To Do It
Create dynamic sigs for multiple users using .htaccess and RewriteRule (0) Ever since I connected a program I made in Visual Basic to MySQL database, I had an idea to create
some sort of a status page... And I did that, where I updated my connection status every 60 seconds,
updated my Winamp playlist, and several other interesting things... Then, I figured I could create
an image, and display all that info, and show it on forums, as a signature... And I made a great
PHP script, that look real fancy, and does the job perfectly... So, I was adding the reference to
http://status.galahad.trap17.com/stat.php to all the forums... BUT (there's ....
.htaccess Problem
how to allow? (2) Order Allow,Deny Order Deny from All How do i change this to allow? I tried Order
Allow,Deny Order Allow from All That didnt work so how do i do it? By the way i have read
the support forum and i couldnt find anything.....
I Need A Hand With Some Htaccess Login Stuffs!
(0) QUOTE Hi all. Im currently trying to get a htaccess/htpasswd login system to work. Its
extremely basic, just one username and one password. my htaccess code is as follows: CODE
AuthType Basic AuthName "Login" AuthUserFile
"/home/MYUSERNAME/public_html/***/***/.htpasswd" require valid-user obviously the stars
mask the real directory My testing code for my password file which is located in the above
directory is as follows: CODE login1:login2 login2 is the password and im fairly sure i
got the syntax right "username:password" is....
Problem With Htaccess (i Guess)...
(0) So here we go: I use htaccess rules to have SEF url`s on my site..here`s my htaccess file:
QUOTE ForceType application/x-httpd-php ForceType application/x-httpd-php ForceType
application/x-httpd-php ForceType application/x-httpd-php And I have those files (quiz,
tour, logout etc) in my root ...according to the htaccess file, those files will be parsed as php..
The urls are like: hts.trap17.com/tour/signup , for example here`s the content of one of that
files: QUOTE $url=$_SERVER ; $url=explode('/',$u....
Path To /.htaccess Folder?
(2) Well - I'm trying to set up .htaccess for a password to a file on my site, but I can't login
with the user and pass I gave. I think it's cause I don't have the whole directory. I'm
using this site: http://www.tools.dynamicdrive.com/password/ This is my .htaccess: AuthName
"Restricted Area" AuthType Basic AuthUserFile /.htpasswds/.htpasswd AuthGroupFile /dev/null
require valid-user I noticed the htpasswds directory when I was looking around. I expect that is
what it's for, right? Anyhow, does anyone know the path I need to use this?....
Using The Rewriterule
.htaccess (0) Quick into on .htaccess .htaccess (note the dot) is a text file, each command is meant to
be placed on a single line, so if your text editor has word-wrap, make sure it is turned off. When
you upload it to your server, make sure it is uploaded in ASCII mode rather than binary. What
is mod_rewrite? mod_rewrite is a apache modal that allows you to rewrite URLs at a server
level. For example, when a user requests the page http://www.domain.com/index/disks/
mod_rewrite could rewrite the URL so that the sever really gives this page http://www.domain.....
Renaming Your Url's
Can you use htaccess? (3) I was wondering if you could change and example link, http://frugoproductions.com/ index.php?n=
pages/videos into something like http://frugoproductions.com/pages/videos(.php) or something
easier for visitors to find the page. I'm looking at URL rewriting, but I am unsure if this can
solve me problem. It can be seen at http://www.webhostauditor.com/articles/url_rewriting.shtml
I'm not sure if the URL rewriting is the same, because, when it has ?n= it usually means
something like it takes the index page's templete and uses it for the pages that can be ad....
Can't Upload .htaccess And .mdu File...
bad filenames (5) Hi there i am new to computing host free web hosting.. and I try to upload a php script file.. all
the .php file was uploaded but the .htaccess and .mdu file was not. it has an error and the error
says this: bad filenames extension.. what should i do? pls. help!! thanks a lot.....
[^] Need Help With Regex (for .htaccess)
(2) Well, I ran into a problem. I tried to make a code that matched everything, except strings
containing the word "php", "gif", "jpg" etc. I tried doing something like this, but it didn't
work: CODE ([^\b(php|gif|jpg)\b]+)$ But that works
just like if I would do this: CODE ([^phgifj]+)$ That code is a part of
a larger code that only works partially: CODE RewriteEngine on RewriteRule
([^\b(php|gif|jpg)\b]+)$ item.php?n=$1 Some
strings, su....
.htaccess-style Login System And Php
(13) I am trying to make a login system that looks and works like .htaccess using sessions, with a PHP
script that detects the username used. Let's say I log on with the username "Amezis" and
correct password. Then I want a PHP (or any other kind of script) to create a cookie or session
which stores the user name, so it could be possible to store it in a variable as long as the user is
logged in, and so it can be printed when needed. Basically, this is what I want the script to do:
CODE /* This file can only be executed after logging in with the htaccess-style login....
.htaccess Override
Where the #$%^ is httpd.conf located? (6) Hey. I'm currently developing a site for a client using Joomla (the CMS), and am trying to
enable search engine friendly URLs. To do this, I need to enable .htaccess override for a specific
set of directories. Therefore I have two questions: 1) Where is httpd.conf (the apache config
file) located in our installiations? I've spent about a half an hour browsing through
everything, and still havn't found it. 2) How would I go about enabling .htaccess override just
for a specific set of directories (just one directory, and all of its sub directories). Any ....
I Need Help To Use Htaccess To Allow Only My Server To See A Directory
(4) Hi everyone Ive finally got a bit of an opportunity to do some php coding for an organisation which
shouldnt be too hard. But i want to have some php files which will be used as includes in another
php script but for added protection i dont want these php files to be visible by the public. I know
i can use htaccess to easilly hide these files but what im worried about is will the head script be
able to see the includes it needs if the htaccess file is hiding the entire directory? Obviously
its no good if not even the local server can see its own scripts and i havent us....
How To Modify .htaccess To Protect A Directory?
(3) hi i have a free webhost included cpanel but it's cpanel is not full and i can not protect my
dir through it. then i think i should use .htaccess . now i dont how i must creat .htaccess files or
hoy to using it /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> can any one help me
pl....
.htaccess Files Supported?
(6) I have a doubt on this hosting. Is .htaccess files are supported on the hosting. Is the rewrite url
operation is allowed on the .htacess file?....
Mod_rewrite And Htaccess
(5) I am wondering if trap17.com (free web hosting, no ads) supports mod_rewrite and htaccess or are
these features disabled. I have tried many different hosting services and so far I've found none
that support it. These two features are very valuable when one wants to have a web presense and have
an SEO site. Additionally, it would enable one to earn enough cash to be able to purchase hosting.
Sometimes I wonder if it's possible for "low-income" people to even earn a little residual
income. LoL. I hope someone can shed a little light on whether these features are av....
.htaccess File In Hosting Space Modification
what happens if i modify it? (5) hello guys!... i just installed from fantastico joomla and i while i was installing it, it
prompt me if i wish to install it on the root directory i should delete the .htaccess that is there,
my question is, what happens if i delete the file located there or if i replace the file? Is it
going to damage my site, the login or something? Title modified. ....
.htaccess Query
(0) I wasn't sure where exactly to post this, so I'm just going to post it in the HTML section.
Alright, basically what I want to know is if tehre is some sort of .htaccess code i could use on a
domain so that a certain file is shown in the header and/or footer of any subdomain? So, for
example I added this code and made it include a file Pageheader.php into every subdomain, with the
contents I am a test file in it, if i hosted someone as a subdomain, it would show up as "I am a
test file" then the rest of their page? also, if this is possible, would there be any ....
Htaccess To Block Bots
How do you block bots and spiders? (7) I am curious about how to block the bots and / or spiders from accessing my subdomain. I believe
that I may have one using a terrible amount of Bandwidth. Is this possible? and how do I stop it?....
.htaccess Redirect Question
redirect ALL traffic to another domain (6) I want to redirect all my traffic from one site to another domain name. Is this possible, and if so,
would I do something like this: .htaccess code: CODE redirect 302 /
http://www.mynewdomain.com Thanks!....
How To: Change Your Website's Index File
a simple trick using .htaccess (18) How To: Change Your Website's Index File a simple trick using the .htaccess file A simple
tutorial which only involves editing one little file. Useful for those of us who have mime-typed
extensions or who are creating lots of test design files and want an easy way to make the design
they like best their default file. Create a file called .htaccess in the /public_html/ folder if
you don't have it. I think one should be there already when you get your site so if it isn't
you should create it anyway! In the file write the following: CODE Di....
Need .htaccess Help
Internal server error (1) Initially my .htaccess file looked like this: QUOTE # -FrontPage- IndexIgnore .htaccess */.??*
*~ *# */HEADER* */README* */_vti* order deny,allow deny from all allow from all order
deny,allow deny from all AuthName www.beeseven.trap17.com AuthUserFile
/home/beeseven/public_html/_vti_pvt/service.pwd AuthGroupFile
/home/beeseven/public_html/_vti_pvt/service.grp Then I tried adding a few things, and I got an
internal server error. QUOTE Content-Type: text/html; charset=utf-8 Content-Language: en
ErrorDocument 403 /403.shtml ErrorDocument 404 /404.shtml A....
.htaccess?
(4) Does anyone know of a script that when you type in your user/password in a form, can log you into a
.htaccess protected area?....
.htaccess
(4) Hi, what is the default .htaccess file?
- i need to adjust it but only want to change one line.
thanks....
.htaccess Charset Problem...
(2) I have a problem with the charset in my php page... firstly the whole site included .html and .php
didn't automaticly get the right charset i put in the meta content so I added a .htaccess file
CODE AddDefaultCharset Big5 then it works fine with the .html file extension... but not my
php file... so i added another line in .htaccess file CODE AddCharset Big5 .php but still
not working... there is something i wondering... coz my link to the php file is "foo.php?A=B" would
that be the problem that the .htaccess file dun see it as a normal .php? Pl....
Is .htaccess Allowed ?
as the topic (0) is mod rewrite allowed in trap17 server ? coz i need to change my dynamic page into a static url .
thx....
Looking for htaccess
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for htaccess
*MORE FROM TRAP17.COM*
|
advertisement
|
|