我刚碰到这个。我正在运行一个wordpress网站,我想将这个www.dentistcostamesadds.com/index重定向到www.dentistcostamesadds.com。我的下面的代码不起作用。htacess重定向索引,没有文件扩展名
# Permanent URL redirects
RewriteEngine On
RewriteBase/
Redirect 301 /index http://www.dentistcostamesadds.com
正如你可以看到下面,只有/指数没有扩展不起作用。为什么?
Redirect 301 /index.php http://www.dentistcostamesadds.com WORKS
Redirect 301 /index.html http://www.dentistcostamesadds.com WORKS
Redirect 301 /index.aspx http://www.dentistcostamesadds.com WORKS
Redirect 301 /home http://www.dentistcostamesadds.com WORKS
Redirect 301 /home.html http://www.dentistcostamesadds.com WORKS
Redirect 301 /index http://www.dentistcostamesadds.com DOESN'T WORK