0

我有域名 alfared.in.ua/public (zf2),但我想将我的域名更改为 alfared.in.ua?我该怎么做?
这是我的 .htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

httpd-vhosts.conf

<VirtualHost alfared.in.ua:80>
    DocumentRoot "c:\xampp/htdocs/alfared.in.ua/www/module/Application/view/layout/"
    ServerName alfared.in.ua
    SetEnv APPLICATION_ENV "development"

<Directory "C:/xampp/htdocs/zf2/public">
    DirectoryIndex index.php
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

</VirtualHost>
4

1 回答 1

0

您可以尝试将您的 httpd.vhosts.conf 修改为

<VirtualHost alfared.in.ua:80>
    DocumentRoot "C:/xampp/htdocs/zf2/public"
    ServerName alfared.in.ua
    SetEnv APPLICATION_ENV "development"

    <Directory "C:/xampp/htdocs/zf2/public">
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

</VirtualHost>

这应该够了吧。但是我有点困惑,因为您在一个配置中使用了两个不同的位置

于 2013-02-06T08:04:16.130 回答