我在我的网站mydomain.com/magento上安装了Magento。我很高兴留在这个目录中,但是当人们直接访问该网站(即mydomain.com)时,我想打开Magento文件夹。我怎么能这样做?
非常感谢。
答案 0 :(得分:1)
你必须让你的服务器重定向" mydomain.com"到您安装Magento的目录。如果您使用的是apache,可以将以下虚拟主机添加到httpd.conf:
<VirtualHost *:80>
ServerName mydomain.com
DocumentRoot "/yourpath/magento"
CustomLog "/tmp/access_log" common
LogLevel debug
ErrorLog "/tmp/error.log"
<Directory "/yourpath/magento">
Options FollowSymLinks Multiviews Indexes
MultiviewsMatch Any
# Rewrites to allow links
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# We are not allowing any directive contained in a .htaccess file
AllowOverride None
# We grant all permissions
Require all granted
</Directory>