Welcome to WebmasterWorld Guest from 54.145.118.24

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Mod rewrite question

RewriteEngine on in every .htaccess file?

     
4:38 pm on Aug 8, 2006 (gmt 0)

Full Member

10+ Year Member

joined:Mar 28, 2004
posts:224
votes: 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

7:18 pm on Aug 8, 2006 (gmt 0)

Senior Member

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

joined:Mar 31, 2002
posts:25430
votes: 0


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

RewriteOptions inherit [httpd.apache.org]

Jim

1:59 pm on Aug 9, 2006 (gmt 0)

Full Member

10+ Year Member

joined:Mar 28, 2004
posts:224
votes: 0


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

Cheers.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members