WordPress Localhost中的false URL
当我使用背景图像时,我正在与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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论