如何修复 Magento 安装上的 unsecure_base_url?

发布于 2024-10-05 00:40:49 字数 512 浏览 6 评论 0原文

我在上传图像时遇到问题,并试图修复它,碰巧更改了配置中的base_url,这导致我的网站根本没有任何样式(包括管理员)。

我已经进入 phpMyAdmin 并修复了网址,但我没有任何运气。这就是我目前所拥有的...

web/unsecure/base_link_url   http://www.northwalesdoorworld.co.uk/
web/unsecure/base_skin_url   http://www.northwalesdoorworld.co.uk/skin/
web/unsecure/base_media_url   http://www.northwalesdoorworld.co.uk/media/
web/unsecure/base_js_url   http://www.northwalesdoorworld.co.uk/js/

有人可以看看我的网站 - Northwalesdoorworld.co.uk - 并推荐一种解决我的问题的方法吗?

谢谢, 格雷格.

I've been having problems with uploading images and in trying to fix it, happened to change the base_url in the config which has now caused my website to appear without any styling at all (inc the Admin).

I've gone into phpMyAdmin and fixed the urls but i'm not having any luck. This is what i've got at the moment...

web/unsecure/base_link_url   http://www.northwalesdoorworld.co.uk/
web/unsecure/base_skin_url   http://www.northwalesdoorworld.co.uk/skin/
web/unsecure/base_media_url   http://www.northwalesdoorworld.co.uk/media/
web/unsecure/base_js_url   http://www.northwalesdoorworld.co.uk/js/

Could someone please take a look at my site - northwalesdoorworld.co.uk - and recommend a way to solve my problem?

thanks,
Greg.

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

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

发布评论

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

评论(3

薄情伤 2024-10-12 00:40:49

如果您无法访问您的站点,因为您可以直接更改 core_config_data 表中的值,

SELECT *  FROM core_config_data WHERE path LIKE '%web/unsecure%' or path LIKE '%web/secure%'

您可以通过编辑值来修复它们,如 Clockworkgeek 建议的那样或从数据库中删除整行,它们将由 Magneto 重新创建,您可以使用管理页面添加新值。

if you can't access your site due that you can change the values directly in core_config_data table

SELECT *  FROM core_config_data WHERE path LIKE '%web/unsecure%' or path LIKE '%web/secure%'

you can fix them by editing the values to be like clockworkgeek suggested or removing whole rows from database and they will be created over again by magneto and you can use the admin page to add new values.

树深时见影 2024-10-12 00:40:49

将四个值更改为:

{{unsecure_base_url}}
{{unsecure_base_url}}skin/
{{unsecure_base_url}}media/
{{unsecure_base_url}}js/

在您的 magento 文件夹中清空 var/cache/

Change the four values to:

{{unsecure_base_url}}
{{unsecure_base_url}}skin/
{{unsecure_base_url}}media/
{{unsecure_base_url}}js/

Empty var/cache/ in your magento folder.

堇色安年 2024-10-12 00:40:49

请参阅最新的 Magento wiki 条目: http://www.magentocommerce.com/wiki/recover /restore_base_url_settings

您还可以将类似的内容添加到 /MAGENTO/app/etc/config.xml 而不是操作数据库:

<stores>
<default>
<web>
<unsecure>
<base_url>{{base_url}}</base_url>
<base_link_url>{{unsecure_base_url}}</base_link_url>
<base_web_url>{{unsecure_base_url}}</base_web_url>
<base_skin_url>{{unsecure_base_url}}skin/</base_skin_url>
<base_js_url>{{unsecure_base_url}}js/</base_js_url>
<base_media_url>{{unsecure_base_url}}media/</base_media_url>
</unsecure>
<secure>
<base_url>{{base_url}}</base_url>
<base_web_url>{{secure_base_url}}</base_web_url>
<base_link_url>{{secure_base_url}}</base_link_url>
<base_js_url>{{secure_base_url}}js/</base_js_url>
<base_skin_url>{{secure_base_url}}skin/</base_skin_url>
<base_media_url>{{secure_base_url}}media/</base_media_url>
</secure>
</web>
</default>
</stores>

Please refer to the most recent Magento wiki entry: http://www.magentocommerce.com/wiki/recover/restore_base_url_settings

You can also add something like this to /MAGENTO/app/etc/config.xml rather than manipulate the database:

<stores>
<default>
<web>
<unsecure>
<base_url>{{base_url}}</base_url>
<base_link_url>{{unsecure_base_url}}</base_link_url>
<base_web_url>{{unsecure_base_url}}</base_web_url>
<base_skin_url>{{unsecure_base_url}}skin/</base_skin_url>
<base_js_url>{{unsecure_base_url}}js/</base_js_url>
<base_media_url>{{unsecure_base_url}}media/</base_media_url>
</unsecure>
<secure>
<base_url>{{base_url}}</base_url>
<base_web_url>{{secure_base_url}}</base_web_url>
<base_link_url>{{secure_base_url}}</base_link_url>
<base_js_url>{{secure_base_url}}js/</base_js_url>
<base_skin_url>{{secure_base_url}}skin/</base_skin_url>
<base_media_url>{{secure_base_url}}media/</base_media_url>
</secure>
</web>
</default>
</stores>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文