如何在没有.htaccess的情况下将任何子目录重定向到父目录索引?
现在,我将任何子目录都重定向到parent目录的index.html
RewriteEngine On
RewriteRule ^(.*)$ index-dev.html
。 “> https://myserver.com/parent/ * to
有没有任何方法可以在没有.htaccess的情况下进行操作?例如使用JS? 谢谢
Now I am redirecting any subdirectory to the index.html of the parent directory with a .htaccess
"RewriteRule"
RewriteEngine On
RewriteRule ^(.*)$ index-dev.html
https://myserver.com/parent/* to https://myserver.com/parent
Is there any way to do it without .htaccess? For example with JS?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,我认为也许是不可能的。
我将使用JS URLSearchParams函数获取可变值
OK, I see maybe is not possible.
I am going to use the JS URLSearchParams functions to get a variable value