Hi All,

I have a .htaccess file which is working perfectly for redirecting root (/)
pages to be searched to a subfolder. The rule is below ...

=============================================
RewriteEngine on

RewriteCond %{REQUEST_URI} ^/(profile|images)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /$1/ [L,R]

RewriteCond %{REQUEST_URI} !^/mydomainnet/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /mydomainnet/$1

RewriteCond %{HTTP_HOST} ^(www.)?mydomain.net$
RewriteRule ^(/)?$ mydomainnet/index.html [L]

=============================================

So.. .when I type mydomain.net it will search into mydomainnet folder. But
the problem is, when I type mydomain.net/mydomainnet/ .. It still function
as when I just type mydomain.net . How can I abstracting the mydomainnet
subfolder, so that when I go to mydomain.net/mydomainnet/ it will go to an
error page ?

Thanks,

Feris

Reply via email to