[英]Prevent wordpress from changing htaccess
I need to use wordpress/woocommerce functions on codeigniter. 我需要在codeigniter上使用wordpress / woocommerce功能。 I've tried the Woocommerce Rest Api and it is extremely slow.
我已经尝试过Woocommerce Rest Api,它非常慢。 So for an alternative i've copied wordpress/woocommerce to codeigniter upload folder.
因此,作为替代方案,我将wordpress / woocommerce复制到了codeigniter上传文件夹中。 In the
index.php
in codeigniter i've added 在codeigniter的
index.php
中,我添加了
require_once('/home/sites/example.co.uk/public_html/retail/uploads/wordpress/wp-load.php');
require_once('/home/sites/example.co.uk/public_html/retail/uploads/wordpress/wp-blog-header.php');
Which is fine, i can now use wordpress functions but my codeigniter urls have been changed. 很好,我现在可以使用wordpress函数,但我的codeigniter网址已更改。 I've removed the .htaccess from the Wordpress folder and urls are still changed.
我已经从Wordpress文件夹中删除了.htaccess,并且网址仍然更改。 How do i solve?
我该如何解决?
I solved this by changing the site_url
to wp_site_url
in the wordpress folder. 我通过在wordpress文件夹
wp_site_url
更改为site_url
来解决此问题。 Now the urls in codeigniter aren't being changed. 现在,无需更改codeigniter中的url。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.