I test webapp on AWS Elastic Beanstalk (Tomcat 8).
I would like to rewrite third level domain requests to specific urls.
For example:
request aaa.example.com rewrite to example.com/#!aaa
request bbb.example.com rewrite to example.com/#!bbb
etc...
This is Elastic Beanstalk /etc/httpd/conf.d/elasticbeanstalk.conf
<VirtualHost *:80>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8080/ retry=0
ProxyPassReverse / http://localhost:8080/
ProxyPreserveHost on
RewriteEngine on
RewriteCond %{HTTP_HOST} ^aaa.example.com [NC]
RewriteCond %{HTTP_HOST} ^www.aaa.mydomain.com [NC]
RewriteRule ^(.*)$ http://ift.tt/1WrMly3 [L]
RewriteCond %{HTTP_HOST} ^bbb.example.com [NC]
RewriteCond %{HTTP_HOST} ^www.bbb.example.com [NC]
RewriteRule ^(.*)$ http://ift.tt/1MStbjg [L]
RewriteCond %{HTTP_HOST} ^ccc.example.com [NC]
RewriteCond %{HTTP_HOST} ^www.ccc.example.com [NC]
RewriteRule ^(.*)$ http://ift.tt/1WrMn98 [L]
ErrorLog /var/log/httpd/elasticbeanstalk-error_log
</VirtualHost>
But rewrite don't work.
Hope it's clear enough, can you point me in the right direction?
Aucun commentaire:
Enregistrer un commentaire