Welcome to WebmasterWorld Guest from 50.17.74.162

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

How can I Reset .htaccess In a Subfolder?

     

Komodo_Tale

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

10+ Year Member



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

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

10+ Year Member



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

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

WebmasterWorld Senior Member 10+ Year Member



.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

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

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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

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

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



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
 

Featured Threads

Hot Threads This Week

Hot Threads This Month