내가 원하는 것조차 할 수 있는지, 가까운지 많은 것들을 발견했지만 확실하지는 않다. 내가 원하는/루트 루트 (/) 웹 루트에서 자신의 하위 폴더에서 실행되는 wordpress 사이트로 리디렉션해야합니다. 사용 :루트를 다른 폴더로 리다이렉트하지만 다른 앱은 라우터
RewriteEngine on
# our root gets redirected to wordpress
RedirectMatch ^/$ http://mysubdomain.com
... 잘 작동합니다. 그런 다음 루트 이외의 항목 (예 : example.com/somepath)을 처리하려면 루트에 index.html이 필요합니다. 이것은 자체 라우터가있는 Vue JS 앱의 진입 점입니다. 시도 :
RewriteEngine on
# our root gets redirected to wordpress
RedirectMatch ^/$ http://mysubdomain.com
# anything else load our app (index.html in the web root)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://example.com/$1 [L,QSA]
...하지만 너무 많은 리디렉션 오류가 발생합니다.
RewriteEngine on
# our root gets redirected to wordpress
RedirectMatch ^/$ http://mysubdomain.com
# anything else load our app (index.html in the web root)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.html [L,QSA]
을 ... 그리고 경로가 바로 URL을 경로 대신 그들에 리터럴 index.html을이 expcept이 거의 작동 : 나는 시도했다. 목표는 루트 루트가 웹 루트에서 hte Vue JS 앱을 통해 문자 그대로의 경로로 이동한다는 것 (index.html을 통해 생각하는 것)입니다. 따라서 http://example.com/somepath
으로 가면 브라우저 위치는 Vue JS 라우터를 통한 경로 프로세스 여야합니다.
희망이 있습니다. 어떤 생각이나 생각? 또한 Vue JS 응용 프로그램이 포함 된 하위 폴더로 리디렉션 할 수 있지만 하위 폴더를 URL에서 제외 할 수 없다면 클라이언트가 원하는 것은 아닙니다.
TIA!