2017-07-29 3 views
0

hereの手順に従っています。 以下のコードをコピーして.htaccessファイルに貼り付けました。 .htaccessファイルは、私のdistフォルダを含む同じリポジトリにあり、Apacheにデプロイする予定です。Apacheサーバー上での角度配置

RewriteEngine On 
# If an existing asset or directory is requested go to it as it is 
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR] 
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d 
RewriteRule^- [L] 

# If the requested resource doesn't exist, use index.html 
RewriteRule^/index.html 

私はそれが私のindex.htmlファイルを使用し、それが自動的にlocalhost/dist/loginにリダイレクトされますので、localhost/distすべてが、罰金行くアクセス。今すぐ私がlocalhost/dist/loginを直接要求すれば、apacheは文句を言って表示しますThe requested URL /dist/login was not found on this server.私のために、Apacheが私の.htaccessの設定を取得していないようです。私が間違っていることはありますか?

答えて

0

最後に私は自分の問題を解決する方法を見つけました。たぶんこれがいくつかの助けになるかもしれない。私は

RewriteRule^/dist/index.html

を書いて、これは私の問題を解決し

は、Apacheのrewrite modeを有効にし、代わりに

RewriteRule^/index.htmlの。

関連する問題