
httpd.conf にこの conf を作成するにはどうすればよいでしょうか:
ユーザーアクセスhttp://サイトコンテンツを見るhttp://サイト:8080
しかし
アクセスするとhttp://site/index.html、リダイレクトされるはずですhttp://site/app/index.html
これはhttp://site:8080/app/index.html
ユーザーがアクセスするとhttp://site:8080/index.htmlアクセスはそのままにしておく必要があります。リダイレクトしないでくださいhttp://site:8080/app/index.html
httpd.conf で次の設定を試しました:
Redirect "/index.html" "/app/index.html"
ProxyRequests Off
ProxyPreserveHost on
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
RewriteEngine On
しかし、index.html から app/index.html への変換は機能しません。
httpd.conf で実行できますか?
8080 は tomcat 上にあり、80 は httpd 上にあります。
答え1
答えが見つかりました:
RewriteRule ^/index\.html$ /app/index.html [L,R]