我将一个臃肿、复杂的网站改成了一个只有一页的小网站,因此用户需要从404页面重定向到index.html。
我把这个放进了.htaccess文件中:
ErrorDocument 404 /index.html
如果您键入mydomain.com/lalalalala,它将重定向到主页内容(mydomain.com/index.html),但URL栏仍会显示mydomain.com/lalalalala。
如何将404重定向到index.html并将URL重写为mydomain.com?
编辑:
我正在使用Bluehost。