English 中文(简体)
从服务器复制 Magento 存储器到本地端主机 - > URL 重写错误
原标题:Duplicated magento store from server to localhost -> url rewrite error

我复制了我的magento 存储到本地的 xampp 服务器。 现在没有显示用相对 URL 引用的图像( 例如按钮) 。

在 phtml 文件中, 这些图像通过

<img src=/skin/default/default/images/button.jpg>

当我给他们一个绝对的骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质骨质

<img src=http://localhost/magento-test/skin/default/default/images/button.jpg>

我试着修改我的本地权限

RewriteBase /magento-test/ 

RewriteBase /

和 I also changed disabled 和 endable URL rewrites in the backend. I also have

 http://localhost/magento-test/

以我的后端为基地

But the images still don t show up on my local frontend. Any suggestions?

最佳回答

为了避免许多这样的头痛, 您应该在模板文件中使用 getSkinUrl () 方法来引用您的图像。 例如, 您使用 :

<img src="<?php echo $this->getSkinUrl( images/button.jpg ) ?>" />

这将使用您管理区域中合适的 URL 构建您图像的绝对引用 。

问题回答

暂无回答




相关问题
URL rewrite in IIS6 - Third party tools

I have collected the following api/sdk/whatever which provide modules for doing url rewriting in IIS 5/6/7. Some are free-open source and some require $. I haven t tried any of them. I would like to ...

Rewrite spring-security redirect URLs

I m trying to get Tuckey UrlRewriteFilter to tidy up URLs for my webapp. One problem I ve got is that when spring-security notices that an anonymous user is trying to access a protected resource it ...

ASP.NET Friendly URLs

In my research, I found 2 ways to do them. Both required modifications to the Application_BeginRequest procedure in the Global.Asax, where you would run your code to do the actual URL mapping (mine ...

Could I get by HttpModule the URL that contains * before?

My web-site is working under ASP.NET 3.5, IIS7, Integrated pipiline mode. My HttpModule is getting request to all resources, including URLs like this: http://my-site.com/address And I would support *...

Domains & Foreward Slash

This is rather difficult to explain so please bear with me. We will be hosting 4 websites on our server and the plan is to have each site sit under its own domain: site-a.com site-b.com sub1.site-b....

URL Mod-Rewrite

I currently have a working URL: http://example.com/security-services.php?service=fixed-camera-surveillance and then I have PHP say, $_REQUEST[ service ] to do some stuff... But I d like to ...

热门标签