.htaccess 如何更改域名?
我有域名alfared.in.ua/public(zf2),但我想将我的域名更改为alfared.in.ua?我如何做到这一点?.htaccess 如何更改域名?,.htaccess,zend-framework,.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 ^
这是我的.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>
DocumentRoot“c:\xampp/htdocs/alfared.in.ua/www/module/Application/view/layout/”
服务器名alfared.in.ua
SetEnv应用程序_ENV“开发”
DirectoryIndex.php
允许超越所有
命令允许,拒绝
通融
能否尝试将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>
DocumentRoot“C:/xampp/htdocs/zf2/public”
服务器名alfared.in.ua
SetEnv应用程序_ENV“开发”
DirectoryIndex.php
允许超越所有
命令允许,拒绝
通融
这应该能奏效。但我有点困惑,因为您在一个配置中使用了两个不同的位置