1
我的webroot中有一个名为Country的文件夹。我在这个子文件夹中有一个index.html页面。如果我输入domain.com/country,则会获得domain.com/app/webroot/country/。 如果我在国家后面输入“/”,我会得到我需要的domain.com/country/。我如何使用htaccess从domain.com/country重定向到domain.com/country/htaccess从子文件夹中的索引页面重定向到子文件夹
我希望规则只适用于国家/地区文件夹。我有以下规则,但它适用于我不想要的整个站点。
RewriteEngine on
# index.php to/
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]
任何帮助将不胜感激。