homepage Welcome to WebmasterWorld Guest from 23.20.34.25
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
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




msg:4164919
 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




msg:4164934
 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




msg:4165007
 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




msg:4165065
 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




msg:4167551
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved