谁能告诉我如何自动将访问者重定向到我网站的子目录(子目录包含 index.html,因此无需在 url 中输入 /index.html)?
例如我的文件结构是这样的:
public_html/index.html <-- 空文件,只包含到 /stageforduets 的 URL 重定向代码
public_html/stagefordues/index.html
我不希望访问者每次都必须输入 www.mywebsite.com/stageforduets。我希望访问者输入 www.mywebsite.com 然后自动重定向到 www.mywebsite.com/colorfulstage(不是 www.mywebsite.com/stageforduets/index.html)
我已经试过了
<meta http-equiv="REFRESH" content="0;url=http://www.mywebsite.com/stageforduets/index.html">
但它不起作用。它给了一个
"Forbidden You don't have permission to access /stageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduetsstageforduets on this server." 错误。o_o
谢谢。