https://example.com/app1
这是我的子目录,它有一个在 apache 服务器上运行的 index.html 文件。
我需要将所有请求重定向到此目录https://example.com/app1/*
,https://example.com/app1
而不更改 URL。
如果用户访问https://example.com/app1/test
它应该被重定向到https://example.com/app1
但 URL 应该保持与https://example.com/app1/test
Options +FollowSymlinks RewriteEngine on RewriteRule ^([a-zA-Z0-9_-]*)$ index.php [nc,qsa]
这个对我有用。
谢谢大家。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句