我的网站有3条规则,除了索引之外,我的网站页面没有任何问题。我的索引页面被称为ecorustic.php,但我希望它显示简单的ecorustic没有扩展。现在如果我浏览页面我得到ecorustic / mountain / himalaya(它失去了扩展名)但是当我返回主页时,它显示ecorustic.php。 PLS帮助
# my .htacces file
RewriteEngine on
RewriteRule ^ecorustic/.php$ index.php #i made it so the server views it as index
RewriteRule ^ecorustic/(.*)/(.*)$ ecorustic.php?categorie=$1&nume=$2
RewriteRule ^ecorustic/(.*)$ ecorustic.php?categorie=$1 [L]
答案 0 :(得分:0)
点后添加*符号。
RewriteRule ^ecorustic/.*php$ index.php