Forum Moderators: phranque

Message Too Old, No Replies

subfolders deny access, subdomain allow access

subdomain / subfolder

         

shmocs

4:34 pm on Sep 24, 2006 (gmt 0)

10+ Year Member



Hi there.

I have the following situation:

myhost has in its documentRoot:

- subfolder

  • - .htaccess (RewriteEngine on)
  • - index.php (<?echo 'subfolder index';?>)

- .htaccess (
RewriteEngine on
RewriteRule ^(.*) index.php
)
- index.php (<?echo 'root index';?>)

So, requesting:
[myhost...] - I get 'root index'
[myhost...] - I get 'root index'
[myhost...] -> I have two posibilities:
- when there is .htaccess present, even with no rule inside(just RewriteEngine on) I get 'subfolder index' so I loose wanted effect;
- when there is no .htaccess at all, I get 'root index' as wanted

Ok, probably you would say that I should have no .htaccess file in "subfolder". Well the problem is that "subfolder" points to a subdomain's documentRoot. I mean [subfolder.myhost...] where, of course, I do need a .htaccess to figure out some rules.

My first idea was to rename physical location ("subfolder") for that virtual host (subfolder.myhost) - because having a physical "subfolder_" or "_subfolder" mapped for (subfolder.myhost) -> requesting "http://myhost/subfolder" wouldn't have been a problem. But... this is done at server config level... and I have no access, as long it is done automatically by Cpanel.

Is there a possibility using .htaccess? ^:)^