Forum Moderators: phranque

Message Too Old, No Replies

directoryindex directive selectively?

         

paperlion

1:29 pm on Apr 22, 2010 (gmt 0)

10+ Year Member



Hi.

I installed a shopping cart on domain.com/cart.

In order to allow for simplified access, I added an htaccess file to the root folder with just the following line:

DirectoryIndex /cart/index.php

I need to get to the cart's admin folder though without being redirected. Does anyone know of an appropriate additional htaccess parameter for this?

In other words, to allow direct page access to the folder:
domain.com/cart/admin

Thanks.

paperlion

1:42 pm on Apr 22, 2010 (gmt 0)

10+ Year Member



ahh. easy when i remembered how (of course!)...

just needed the exact url. duh!

thanks just the same everyone.
best,

jdMorgan

11:02 pm on Apr 22, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



DirectoryIndex uses a filepath, not a URL. I suspect you'll run into trouble (such as unwanted 302 redirect responses, messing up your search engine ranking) if you put a URL in there...

To override this DirectoryIndex in the /cart/admin folder, simply put another DirectoryIndex directive into /cart/admin/.htaccess declaring the proper index file for that subfolder.

If this isn't workable, then you could replace this function with a mod_rewrite rewriterule, and exclude the /cart/admin folder from that rule.

Jim

paperlion

11:21 pm on Apr 22, 2010 (gmt 0)

10+ Year Member



thanks. I meant though, that if I just type the exact url in the address bar, that overrides the htaccess defaults.