ADVERTISEMENT



Google       

Home -> Law Blog Directory -> Legal Marketing & PR Blogs -> PaperStreet Web Design: SpeakOut

OR PHONE (866) 635-1838 for Bankruptcy Help, (866) 635-6190 for Divorce,
(866) 635-2689 for Personal Injury or (866) 635-9402 for Criminal Defense

Find a Local Lawyer

Bankruptcy (866) 635-1838
Divorce (866) 635-6190
Personal Injury (866) 635-2689
Criminal Defense (866) 635-9402

Bookmark

Legal Marketing & PR

: PaperStreet Web Design: SpeakOut

HTTPD.ini Rewrites - How to Exclude a Subfolder - Quick and Dirty

By Peter Boyd

ADVERTISEMENTS

Sorry to get geeky on our blog, but this is some good code for everyone with httpd.ini files installed on their Windows servers. The question often comes up on how to exclude a certain folder or subfolders from the rewrite processing rules.

Basically, you want your rewrites to process on all folders and files, except a certain folder or folders. Well to do that it’s easy:

RewriteRule /folder-name/(.*) /folder-name/$1 [L]

Simply put in your folder name for duh … the “folder-name” and it will exclude that from processing. Technically, I don’t think it excludes, but really processes it to write the same path. However, it works and that is all that matters for rewrites. You might have a slight speed increase if you can figure out the complex way of actually conditionally excluding folders and setting all the paths. So far, this is the quick and dirty way of doing that.

So two real-world examples are for excluding your blog and images directory:

RewriteRule /blog/(.*) /blog/$1 [L]
RewriteRule /images/(.*) /images/$1 [L]

If you wanted to exclude your blog or images directory from running rewrites that are also processing, use that code. Put this above any other rules that are processing, so it runs first and stops (the “L” means last rule).

Full post as published by PaperStreet Web Design: SpeakOut on March 17, 2009 (boomark / email).

Bloggers, promote your law blog by nominating your blog for inclusion in USLaw.com's Law Blog Directory and RSS Reader. Benefits described.
Lawsuits and Settlements

Related Searches

























































































































US Law
#1 Online Legal Resource













Your Blog Subscriptions
Subscribe to blogs

10,000+ Law Job Listings
Lawyer . Police . Paralegal . Etc
Earn a law-related degree
Are you the author of this blog? Adding USLaw.com to your Blogroll increases relevance. You qualify to display a USLaw Network badge.
Suggest changes to this blog's description or nominate another for inclusion. Register for updates.


Practice Area
Zip Code:

Contact a Lawyer Now!






0.0023 secs (from cache 11/03/26 10:03:27)