tuning mod_rewrite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
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
[Index of Archives]
[Open SSH Users]
[Linux ACPI]
[Linux Kernel]
[Linux Laptop]
[Kernel Newbies]
[Security]
[Netfilter]
[Bugtraq]
[Squid]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Samba]
[Video 4 Linux]
[Device Mapper]