Hi all,
I need your advise and expertise.
I set a rewrite rules to hide index.php, the rule as follow:
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/]+/)*index\.php[?]? [NC]
RewriteRule ^(([^/]+/)*)index\.php$ [
domain.com...] [NC,R=301,L]
It will hide the index.php and it works fine.
If i open www.domain.com/index.php it will be resolved to www.domain.com.
However, i have another subfolder with index.php also which is affected by the rule also.
If i open www.domain.com/administrator/index.php, it will be resolved to www.domain.com/administrator/
The result, i could not login to the administrator webpage because the index.php is hidden.
How to fix the rewrite rule to only applies on the main www.domain.com only ?
Regards,
Kelvin