在子目录

时间:2016-01-06 11:54:50

标签: php apache .htaccess laravel-5 httpd.conf

我想在我的开发机器http://dev-machine/applis/main/laravel

内的子目录中进行操作

我的默认文档根目录是F:/ data / web

我的.htaccess文件是

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /applis/main/laravel
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

</IfModule>

我的httpd.conf文件包含以下代码

<VirtualHost *:80>
  ServerName http://dev-machine/applis/main/laravel/public
  DocumentRoot F:/data/web/applis/main/laravel/public
  <Directory "applis/main/laravel/public">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
  </Directory>
</VirtualHost>

我也尝试过belwo虚拟主机配置

<VirtualHost *:80>
  ServerName http://dev-machine/applis/main/laravel/public
  Alias /laravel applis/main/laravel/public
  DocumentRoot F:/data/web/applis/main/laravel/public
  <Directory "/applis/main/laravel/public">
    AllowOverride all
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

但是我无法通过

访问该应用
http://dev-machine/applis/main/laravel/public

我得到他低于错误

Not Found

The requested URL /applis/main/laravel/public/ was not found on this server.

当我尝试直接通过http://dev-machine/applis/main/laravel/public/index.php加载index.php文件时添加虚拟主机

0 个答案:

没有答案