backbone.js의 라우터를 localhost의 내 XAMPP Apache 서버와 함께 사용하려고합니다.localhost에서 XAMPP apache 서버와 함께 pushstate를 사용하는 백본
나는 아파치가 라우터로 가서 그냥 모든 것을 /test_backbone/index.html
에 전달해야하는 디렉토리 경로를 평가하는 것을 막아야한다. 내가 찾을 수있는 모든 것을 시도했지만 아무것도 작동하지 않습니다. 현재
, 나는 httpd.conf 파일이 있습니다
# html5 pushstate (history) support:
<ifModule mod_rewrite.c>
Options +FollowSymLinks
IndexIgnore */*
# Turn on the RewriteEngine
RewriteEngine On
# Rules
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /test_backbone/index.html
</ifModule>
나는 또한이 시도했습니다
# html5 pushstate (history) support:
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index
RewriteRule (.*) index.html [L]
</ifModule>
내가 그 라인의 일부는 말을 생각하고 있다는 인상이었다 정적 파일을로드 할 수 있지만 내 자바 스크립트 파일이로드되지 않으면 모든 내용이 다시로드됩니다. /test_backbone/index.html
나는 또한 시도했습니다 .htaccess
파일. 내가 알기로는이 코드를 올바른 위치에 두지 않는다.
도움이 될 것입니다.