如何更改域名?

时间:2013-02-05 17:45:41

标签: .htaccess zend-framework

我有域名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>

1 个答案:

答案 0 :(得分: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>

这应该可以解决问题。但是我有点困惑,因为你在一个配置中使用了两个不同的位置

相关问题