WordPress Localhost中的false URL

发布于 2025-01-22 13:17:51 字数 720 浏览 2 评论 0原文

当我使用背景图像时,我正在与LocalWebsite合作:url('wp-content/uploads/....'....) 它呈现localhost/wp-content/uploads /... 而不是localhost/foldername/wp-content/uploads /....代码> 有人有一个主意吗?这是我所做的,但它们都没有起作用。 在.htacess

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /foldername/
   RewriteRule ^index\.php$ - [L]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule . /foldername/index.php [L]
</IfModule>

和wp-config.php中,

添加了

define( 'WP_HOME', 'http://localhost/foldername' );
define( 'WP_SITEURL', 'http://localhost/foldername/' );

我 有人有主意吗?

提前致谢

I am working with localwebsite , when I use background-image:url('wp-content/uploads/....')
It renders the link of localhost/wp-content/uploads/... instead of localhost/foldername/wp-content/uploads/...
Do anyone has an idea ?This is what I have done but none of them has worked.
In .htacess

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /foldername/
   RewriteRule ^index\.php$ - [L]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule . /foldername/index.php [L]
</IfModule>

and in wp-config.php

I have added

define( 'WP_HOME', 'http://localhost/foldername' );
define( 'WP_SITEURL', 'http://localhost/foldername/' );

but that doesn't work
DO anyone has an idea?

Thanks in advance

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文