重写htaccess url一些问题

发布于 2024-09-18 19:33:45 字数 385 浏览 0 评论 0原文

我有一个几乎可以正确生成 SEFURL 的 CMS。

不过,有一个名为 separator 的菜单项,您可以将其用作 Javascript 的挂钩,该菜单项上没有链接。

创建的 URL 是:

http://www.mysite.com/separator/mycategory/mypage

我想去掉 /separator ,以便 URL 看起来像:

http://www.mysite.com/mycategory/mypage

这可以在 .htaccess 中执行吗?我尝试了一些重写规则,但它们不起作用。

I have a CMS that is generating SEFURLs almost correctly.

However, there is a menu item called separator that you can use as a hook for Javascript, which has no link on it.

The URL that gets created is:

http://www.mysite.com/separator/mycategory/mypage

I want to get rid of the /separator so that the URL looks like:

http://www.mysite.com/mycategory/mypage

Is this possible to do in the .htaccess? I tried a few rewrite rules and they don't work.

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

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

发布评论

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

评论(1

生来就爱笑 2024-09-25 19:33:45
RedirectMatch Permanent ^/separator(.*) $1
RedirectMatch Permanent ^/separator(.*) $1
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文