dpnof28482 2012-11-20 09:50
浏览 27
已采纳

如何将媒体的路径名从localhost更改为Magento中的其他本地URL?

I deployed Magento application on my local. When I am trying to access it using some other system in my local network, application gets opened but am not getting images and css. It is getting resolved to localhost/magento/imagename.jpg. My application is deployed in 127.0.0.1/magento/. Do I need to change my PHP.ini or some setting in Magento Admin?

  • 写回答

1条回答 默认 最新

  • droi5225 2012-11-20 09:52
    关注

    Change the base url to your internal IP address, the ip address your router assigns to you.

    In Windows:

    Start -> Type in cmd and press enter -> ipconfig

    In Linux:

    ifconfig

    Find your local IP which might look like 192.168.1.xx or 10.0.0.xx Enter that as your Base URL (with http:// in front and / at the end) in the magento backend under System -> Configuration -> Web

    OPTIONALLY

    You can enter {{base_url}} as your Base URL in magento backend, this will allow any URL to work, this is however not recommended for live.

    EDIT

    Don't forget to clear your cache by deleting everything in var/cache/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号