2012-02-29 4 views
5

나는 밤새도록 내 머리를 때려 왔고 내가 잘못 가고있는 곳을 볼 수 없다. xampp에서 mysite.local이라는 호스트를 설정하고 모든 지시 사항을 따르기를 원하지만 mysite.local/xampp으로 리디렉션됩니다.xampp - mysite.local은 xampp 폴더로 리다이렉트

내가 여기 잘못 가고있는 아이디어가 있습니까? 아파치 : I 추가 내 호스트 파일을 편집

경로는 올바른지, 그리고 다시 시작했습니다

나는 추가/아파치 - vhosts.conf 편집
127.0.0.1 mysite.local 

:

NameVirtualHost localhost:80 
<VirtualHost localhost:80> 
ServerName localhost 
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs" 
<Directory "/Applications/XAMPP/xamppfiles/htdocs"> 
    Options Indexes FollowSymLinks MultiViews 
    AllowOverride all 
     Order Deny,Allow 
     Allow from all 
</Directory> 
</VirtualHost> 

<VirtualHost localhost:80> 
<Directory "/Applications/XAMPP/xamppfiles/htdocs/wd"> 
    Options Indexes FollowSymLinks MultiViews 
    AllowOverride all 
     Order Deny,Allow 
     Allow from all 
</Directory> 
    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/wd" 
    ServerName mysite.local 
</VirtualHost> 

답변

4

I을 어제 똑같은 문제가 생겼어.

# Your great site! 
<Directory "/Applications/XAMPP/xamppfiles/htdocs/wd"> 
    Options Indexes FollowSymLinks Includes ExecCGI 
    AllowOverride All 
    Order allow,deny 
    Allow from all 
</Directory> 

을두고 혼자 : 당신은이 같은 새로운 가상 호스트를 참조 Apach'es httpd.conf을 편집해야 ) 당신이 한 단계는 상황에서 정확하더라도, 당신은 좀 더 많은 작업을 수행 할 필요가 http://mysite.local에 XAMPP 스플래시 화면으로 리디렉션하지 않고 액세스 할 수 있지만 루트 폴더에 있지 않은 경우 또는 색인이없는 경우에는 proyect의 디렉토리가 표시됩니다. 파일을로드해야하는 경우 폴더 (예 : /public/index.php)에 .htaccess 파일을 사용해야합니다. 이 파일은 제어 할 폴더에 있어야합니다. 예를 들어, 프로젝트의 루트에 위치한 .htaccess 파일이 /public/index.php 파일로 리디렉션 그래서 당신은이 방법을 수행해야합니다

RewriteEngine On 
RewriteBase/
RewriteRule ^.*$ public/index.php [NC,L] 

그냥 당신이 필요로하는 정확한 정규 표현식을 사용하는 것을 기억하고 잊지 마세요 생산 웹 사이트에서 더 많은 보안을 통해 예방 조치를 취하십시오.) 내가 당신을 도왔 으면 좋겠다 =)