unix web 服务器上表单操作上的 WordPress url 错误 (~...)

发布于 2024-09-26 13:12:24 字数 727 浏览 1 评论 0原文

我的 WordPress 安装出现错误...我解释一下: 我的 WordPress 现在位于基于 UNIX 的服务器上,使用 directadmin 来管理我的域... 我已经在女巫上配置了一个新域,我可以通过以下方式访问: http://ipaddress/~username... 然后,出于我的个人需求,我使用 htaccess 重定向通过另一个域名访问该网站,如下所示:

RewriteEngine on
RewriteCond %{HTTP_HOST} subdomain.example.com
RewriteRule (.*) http://ipaddress/~username/$1 [P,L]

这里,一切正常。问题出在管理面板中的表单操作上(例如,当我保存常规配置时,或者当我通过检查选择许多帖子时,选择“移至垃圾箱”操作并单击“应用”... WordPress 执行操作并尝试显示此网址:

http://subdomain.example.com/ ~username/wp-admin/edit.php?trashed=1&ids=456

为什么wordpress在url中添加/~username?

I have an error with my wordpress installation... I explain myself:
My wordpress is now on an unix based server with directadmin to manage my domains...
I have configured a new domain on witch I can access by: http://ipaddress/~username...
Then, for my personal needs, I access to this website through another domain name using an htaccess redirection like this:

RewriteEngine on
RewriteCond %{HTTP_HOST} subdomain.example.com
RewriteRule (.*) http://ipaddress/~username/$1 [P,L]

Here, just all work fine. The problem is in admin panel, on the forms actions (for exemple when I save the general configuration, or when I select many posts by checking, selecting the "move to trash" action and clicking on "Apply"...
Wordpress execute the action and try to display this url:

http://subdomain.example.com/~username/wp-admin/edit.php?trashed=1&ids=456

Why wordpress add /~username in the url?

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

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

发布评论

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

评论(1

简美 2024-10-03 13:12:24

H已经用htaccess文件解决了这个问题。这是其中的代码:

RewriteEngine On
RewriteRule ~[^/]*/(.*) http://domain.com/$1 [R]

只需重定向而不使用 /~username 即可使所有工作正常

感谢 Will :)

Olivier

H have solved the problem with an htaccess file. Here is the code within :

RewriteEngine On
RewriteRule ~[^/]*/(.*) http://domain.com/$1 [R]

That just redirect without the /~username and make all works fine

Thanks to Will :)

Olivier

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