modx htaccess 链接不起作用

发布于 2024-12-07 21:14:49 字数 971 浏览 0 评论 0原文

MODx 开发人员您好,

I am using MODx revolution. I have just transferred site from one domain to another. as it was a IP based server i have created virtual host with the same name it had previously. 
On previous server the files were located at the root but in new server files are located at tab3, so i have created virtual host that points inside that directory. ie. I have all files in modx/ dir so my virtual host config set to /var/www/modx/
Now the problem is whenever i open home page as well as subdomains (contexts) it works and shows the page but when i open any internal links it says 404 page

例如:如果我打开 www.abc.com =>有用 但是当我打开 www.abc.com/contacts =>它不起作用

我看到它的问题与 .htaccess 因为 1)如果我删除htaccess 所有子域和域都工作正常,但像“abc.com/contact”这样的内部链接无法打开并显示 404 2)如果我再次添加它,则只有主域及其内部链接打开...没有子域或子域的内部链接工作

还有一件事....线索是 当我尝试使用这样的 ID 访问同一个 404 页面时 www.abc.com/index.php?id=8056

它有效

我需要从 htaccess 添加/删除某些内容吗?

Hello MODx developers,

I am using MODx revolution. I have just transferred site from one domain to another. as it was a IP based server i have created virtual host with the same name it had previously. 
On previous server the files were located at the root but in new server files are located at tab3, so i have created virtual host that points inside that directory. ie. I have all files in modx/ dir so my virtual host config set to /var/www/modx/
Now the problem is whenever i open home page as well as subdomains (contexts) it works and shows the page but when i open any internal links it says 404 page

Ex : if i open www.abc.com => It works
but when i open www.abc.com/contacts => It doesnt works

I see its issue with .htaccess because
1) if i remove htaccess
all the subdomains and domains works perfect but inner links like "abc.com/contact" doesnt open up and says 404
2) If i add it again only the main domain and its inner links open...no subdomain or inner links of subdomain works

One more thing....and CLUE is that
when i try to access the same 404 page with ID like this
www.abc.com/index.php?id=8056

It works

DO i need to add/remove something from htaccess ??

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

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

发布评论

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

评论(1

┈┾☆殇 2024-12-14 21:14:49

新服务器运行 Apache 吗?我遇到了类似的问题,服务器运行 Zeus &因此 .htaccess 不起作用。有一个解决方案,但对我来说太先进了。在 Apache 服务器上安装更容易。

Is the new server running Apache? I had a similar problem where the server was running Zeus & therefore .htaccess didnt work. There is a solution but was too advanced for me. Was easier to install on an Apache server instead.

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