modx htaccess 链接不起作用
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
新服务器运行 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.