简单的 .htaccess 内部重写问题

发布于 2024-10-02 23:41:44 字数 376 浏览 0 评论 0原文

我想做这个简单的内部写入:

http://localhost/icore4/t1/js/GeneralJs.js

http://localhost/icore4/js/GeneralJs.js

htaccess 位置

icore4/.htaccess

htaccess 代码

RewriteEngine on
RewriteRule ^(.*)/(.*)$ /$2 [NC,L] 

底线,我想摆脱 t1 并将其放入查询字符串中。 到目前为止,我正为摆脱它而烦恼。

I want to do this simple internal write :

http://localhost/icore4/t1/js/GeneralJs.js

to

http://localhost/icore4/js/GeneralJs.js

htaccess location

icore4/.htaccess

htaccess code

RewriteEngine on
RewriteRule ^(.*)/(.*)$ /$2 [NC,L] 

bottomline, I want to get rid of t1 and put it in the query string.
As of now, I am bothered about getting rid of it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猛虎独行 2024-10-09 23:41:44

看看这个问题,我的问题只解决了同样的问题

htaccess重写和递归内部重定向< /a>

check out this question, my question only which solves the same problem

htaccess rewrite and recursive internal redirects

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文