homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

How can I Reset .htaccess In a Subfolder?

 7:57 pm on Jul 5, 2010 (gmt 0)

How can I Reset .htaccess In a Subfolder?

I have a WordPress blog in the root directory and a shopping cart in the /store subfolder. Unfortunately, this combination messes-up the reports in the carts admin section. I traced it back to .htaccess in the root folder.

Since I do not need the WP .htaccess stuff in the shopping cart, can I add a .htaccess to the /store subfolder that will clear those settings? If so, what should be in it?




 8:57 pm on Jul 5, 2010 (gmt 0)

I was doing some research. Will this work?

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/store
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress


 12:54 am on Jul 6, 2010 (gmt 0)

.htaccess files work in a hierarchical fashion.

If you place a .htaccess file in a subfolder that file will overrule .htaccess files on higher levels (eg. the one in the root folder)

So, just upload an empty one to the subfolder. That should do the trick.


 5:37 am on Jul 6, 2010 (gmt 0)

That's not quite correct.

They are processed in a hierarchical fashion. That is, the rules in the root file are processed first, and then the rules in the sub-folder are processed.


 2:49 am on Jul 10, 2010 (gmt 0)

And to add yet another dimension, there's "RewriteOptions inherit" and "RewriteOptions none".

However, this affects only mod_rewrite directives, and not all .htaccess directives.


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