Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 .htaccess for Rewrite only works one directory. No SUB-Dir?
Google
Post new topic Reply to topic
Author Message
wb king
 
 


Joined: 01 Apr 2004
Posts: 3

PostPosted: Thu Apr 01, 2004 9:03 am Reply with quoteBack to top

I have create a RewriteEngine for the .htaccess file. Below is a small portion of it.

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^$ [OR]


However, when I place it on one folder and it works only that folder. It ignores the sub ones?

Can you tell me how to configure apache to work on all sub folders? thanks.
View user's profileSend private message
Vlad Alexa Mancini
lead developer
lead developer


Joined: 07 Jul 2003
Posts: 1539

PostPosted: Thu Apr 01, 2004 3:50 pm Reply with quoteBack to top

The root .htaccess applies to all subdirectories.

A .htaccess file in a subdirectory only applies to that directory, and its children.

If similar but conflicting rules appear in both, the root .htaccess rules will override subdirectories.htaccess commands.
View user's profileSend private message
wb king
 
 


Joined: 01 Apr 2004
Posts: 3

PostPosted: Fri Apr 02, 2004 10:40 am Reply with quoteBack to top

Try this:

http://www.jasontringuyen.com/admin/

Under the above folder /admin. I have .htaccess that prevent people linking:

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^$ [OR]
RewriteCond %{HTTP_REFERER} !^http://68.192.45.3:81/.*$ [NC]


Try to right click and save one of the image file. It will show you a index.html page that that where the RewriteRule is.

However, when you get further down the subs. It doesn't work. Check the link below:

http://www.jasontringuyen.com/admin/congtudeptrai/video/PhuongThanh_LiveShow

all the subs are under /admin and the files in the directory above doesn't get proctected.

Explain this to me.

I had no problem with the orginal apache from Apache.org. This version isn't working. Tell me about it. Thanks.
View user's profileSend private message
Vlad Alexa Mancini
lead developer
lead developer


Joined: 07 Jul 2003
Posts: 1539

PostPosted: Fri Apr 02, 2004 1:26 pm Reply with quoteBack to top

what is the hard drive path of http://www.jasontringuyen.com/admin/.htaccess ?
View user's profileSend private message
wb king
 
 


Joined: 01 Apr 2004
Posts: 3

PostPosted: Fri Apr 02, 2004 3:55 pm Reply with quoteBack to top

mancini wrote:
what is the hard drive path of http://www.jasontringuyen.com/admin/.htaccess ?


Yes, it is.

I have no problem with the orginal Apache when I tried to install each package seperately. So what seems to be the problem?
View user's profileSend private message
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT