[英]Wordpress url error on form actions on unix web server (~…)
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: 我的wordpress安装出现错误...我向自己解释:我的wordpress现在位于具有Directadmin的基于Unix的服务器上,用于管理我的域...我已经在巫婆上配置了一个新域,我可以通过以下方式访问: ipaddress /〜username ...然后,出于个人需要,我使用htaccess重定向通过另一个域名访问该网站,如下所示:
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:
问题出在管理面板上,在表单操作上(例如,当我保存常规配置时,或者当我通过检查选择许多帖子时,选择“移至垃圾箱”操作并单击“应用” ... Wordpress执行并尝试显示此网址:
http://subdomain.example.com /~username /wp-admin/edit.php?trashed=1&ids=456 http://subdomain.example.com /〜用户名 /wp-admin/edit.php?trashed=1&ids=456
Why wordpress add /~username in the url? 为什么wordpress在URL中添加/〜用户名?
H have solved the problem with an htaccess file. H已经使用htaccess文件解决了该问题。 Here is the code within :
这是其中的代码:
RewriteEngine On
RewriteRule ~[^/]*/(.*) http://domain.com/$1 [R]
That just redirect without the /~username and make all works fine 只需重定向而不使用/〜username,并使所有工作正常
Thanks to Will :) 多亏了威尔:)
Olivier 奥利维尔
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.