Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2004-01-22, 07:07 AM   #1
thrillho
Kids are great, Appu. You can teach them to hate the things you hate and they practically raise themselves now-a-days, you know, with the internet and all
 
thrillho's Avatar
 
Join Date: Aug 2003
Location: Austin, TX
Posts: 194
Send a message via ICQ to thrillho Send a message via Yahoo to thrillho
htaccess--one file or many?

Haven't been able to find an answer to this question during much surfing tonight/day.

RewriteEngine on starts the process, then conditions and rule, then the "L" concludes the redirection instructions--this I think I understand.

Without an "L" at the end of the rule, will the server go on to a next set of conditions/rules in the same htaccess file, or would this cause some sort of loop or breakdown (ie. list of urls with access to images followed by redirect for all others, then specific urls that are to be denied all access to files)? Is only one "RewriteEngine on" directive necessary, or should it precede each new set of conditions? Or should all Rewrite condition/rule sets be in separate htaccess files?

Thanks for your patience with yet another damn htaccess question!

Lee
thrillho is offline   Reply With Quote
Old 2004-01-28, 10:51 PM   #2
venturi
No offence Apu, but when they were handing out religions you must have been out taking a whizz
 
Join Date: Apr 2003
Location: An Oasis atop a High Desert Mesa
Posts: 282
Send a message via ICQ to venturi
Oy! I'm kinda stumped on this one, but I don't *think* that the [L] terminates anything but the current set of RewriteCond's.

Generally though, if I have multiple sets of conditions I need to work with I separate them into multiple htaccess files in the corresponding directory. htaccess is hierarchical, meaning that the rules you set up are inherited as you go deeper within the website. So you can "funnel down" your rules as you go deeper into the site.
venturi is offline   Reply With Quote
Old 2004-01-28, 11:18 PM   #3
thrillho
Kids are great, Appu. You can teach them to hate the things you hate and they practically raise themselves now-a-days, you know, with the internet and all
 
thrillho's Avatar
 
Join Date: Aug 2003
Location: Austin, TX
Posts: 194
Send a message via ICQ to thrillho Send a message via Yahoo to thrillho
Thanks for replying--I'd about decided that my question was either too simple or too complex to warrant an answer.

Through trial and error, I think I've figured out that the "L" doesn't stop the whole thing, as you said. But, also as you said, a long list of directives in one file might become quite confusing. To me, anyway. So I think your "one command list per htaccess file" suggestion is the way to go.

Thanks again--much appreciated!

Lee
thrillho is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:40 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc