首页 文章

本地typo3安装路径出现问题

提问于
浏览
-1

在xampp上安装bs_dist扩展名到typo3之后我遇到了问题 . 我设置了空白的typo3安装,然后安装了bs_dist扩展 . 这工作,我可以调用该扩展名生成的默认页面 . 问题是图像没有显示

default-page url:
http://localhost/typo3/typo3/index.php?id=1

image path:
<img src="/fileadmin/files/welcome.gif" ...>
= http://localhost/fileadmin/files/welcome.gif     
but there should be written:
http://localhost/typo3/typo3/fileadmin/files/welcome.gif
this would work.

那么如何改变图像的路径呢?

我的文件夹结构:

-- htdocs
   -- another_custom_project
   -- typo3
      -- typo3
         -- fileadmin
         -- typo3
         -- ...

1 回答

  • 1

    编辑:这是我在带有xampp的Windows 7上的解决方案

    1)在windows上创建localhost的子域:

    C:\Windows\System32\drivers\etc\hosts
    

    添加以下内容,如果这两行中的第一行被注释掉,则取消注释

    127.0.0.1    localhost
    127.0.0.1    yourVirtualServersName.localhost
    

    2)通过添加以下内容告诉apache应该为该子域使用哪条路径

    C:\xampp\apache\conf\extra\httpd-vhosts.conf
    
    NameVirtualHost 127.0.0.1:80
    
    <VirtualHost *:80>
        DocumentRoot "C:/xampp/htdocs/path/to/your/folder"
        ServerName yourVirtualServersName.localhost
        DirectoryIndex index.php
        ServerAlias www.yourVirtualServersName.localhost
        <Directory "C:/xampp/htdocs/path/to/your/folder">
            AllowOverride All
            Allow from All
        </Directory>
    </VirtualHost>
    

相关问题