homepage Welcome to WebmasterWorld Guest from 54.211.97.242
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Mod rewrite question
RewriteEngine on in every .htaccess file?
4string

10+ Year Member



 
Msg#: 3038789 posted 4:38 pm on Aug 8, 2006 (gmt 0)

I have multiple .htaccess files throughout my site. As I was trying to put hotlink protection code in the root directory file I discovered it didn't trickle down to all other directories like I expected. I had to place the code in my other .htaccess files as well.

In which ways should the code be different in subdirectory .htaccess files? Does "RewriteEngine on" need to be in each file or only the top file? Anything else I may be missing?

4

 

jdMorgan

WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3038789 posted 7:18 pm on Aug 8, 2006 (gmt 0)

You should not need to duplicate your code in each subdirectory. Look into

RewriteOptions inherit [httpd.apache.org]

Jim

4string

10+ Year Member



 
Msg#: 3038789 posted 1:59 pm on Aug 9, 2006 (gmt 0)

Thanks, Jim. I always thought that was enabled by default.

Cheers.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved