2016-11-14 212 views
0

我正在使用Xampp,並且正在開發一個Web應用程序。虛擬主機的問題

中的httpd-vhosts.conf

<VirtualHost *:80> 
    DocumentRoot "C:/xampp/htdocs/ProgettoTimelinegit/api" 
    ServerName timeline.dev 
    <Directory "C:/xampp/htdocs/ProgettoTimelinegit/web/app/index.html"> 
     Options Indexes FollowSymLinks MultiViews ExecCGI 
     AllowOverride Authconfig FileInfo 
     Require all granted 
     </Directory> 
    </VirtualHost> 

和etc/hosts中

127.0.0.1 timeline.dev 

在我的瀏覽器我寫timeline.dev它到達HTML,但它不是因爲路徑呈現良好不好。 我的意圖是,當我寫timeline.dev時,它會正確到htdocs/ProgettoTimelinegit/web/app/index.html

在/api/index.php(即調用路由)中有後端和/ web前端。 爲什麼如果我在http請求中寫入'timeline.dev/index.php/route',它會像這樣附加?

localhost:9000/timeline.dev/index.php/route 
+1

'的DocumentRoot「C:??/ XAMPP/htdocs中/ ProgettoTimelinegit /網絡/ app'和溝'' CD001

+0

是什麼的JavaScript與此有關,請不要僅僅因爲建議就添加標籤,確保它們與你的問題有關 –

回答

0

變化 DocumentRoot "C:/xampp/htdocs/ProgettoTimelinegit/api"DocumentRoot "C:/xampp/htdocs/ProgettoTimelinegit/app"