I have a web application in http://example.com:8080/example-app/
When the user types http://example.com/ , I'd like to redirect him to the web app.
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} (.*)example.com$ [NC]
RewriteRule ^(.*)$ http://example.com:8080/example-app/$1 [L,R=301]
I believe the .htaccess has the correct access right:
$ ls -altr /var/www/html/.htaccess
-rw-r--r-- 1 apache apache 178 Jul 2 00:31 /var/www/html/.htaccess
But navigating to http://example.com/ just serves the index.html file.
Can someone tell me why this doesn't work? I there a way to debug this? (apache on centos).