[英]How to remove index.html from url on website based on angularjs
[英]How to remove index.html from url in S3 website hosting?
我有一个像这样的目录:
/example.com/
index.html
foo/
index.html
索引文档设置为index.html
,因此当url为https://example.com
,它显示/example.com/index.html
。
另外,当URL为https://example.com/foo
时,我想显示/example.com/foo/index.html
。
我怎样才能做到这一点?
如果您已在S3存储桶上激活了“ 静态网站托管 ”,并且已将index.html
配置为默认页面,则该页面将自动运行。
为了对此进行测试,我做了以下工作:
foo
目录 index.html
文件上载到foo
目录并公开 /foo
它看起来像:
http://my-bucket.s3-website-ap-southeast-2.amazonaws.com/foo
索引页就很好了。
顺便说一句,它将我重定向到/foo/
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.