homepage Welcome to WebmasterWorld Guest from 54.197.183.230
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?
Komodo_Tale

5+ Year Member



 
Msg#: 4164917 posted 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?

Thanks!

 

Komodo_Tale

5+ Year Member



 
Msg#: 4164917 posted 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]
</IfModule>

# END WordPress

claus

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4164917 posted 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.

g1smd

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



 
Msg#: 4164917 posted 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.

jdMorgan

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



 
Msg#: 4164917 posted 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.

Jim

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