How do I redirect LifeRay port 8080 to HTTP port 80?

Add the following code fragments in your .htaccess file for LifeRay URL redirection.

To redirect the root folder from http://mydomain.com:8080 to http://mydomain.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain.com$ [OR]

RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^/?$ "http\:\/\/mydomain\.com\:8080%{REQUEST_URI}" [P,QSA,L]

To redirect a sub-folder from http://mydomain.com:8080/myfolder/ to http://mydomain.com/myfolder/
RewriteEngine on
RewriteCond %{HTTP_HOST} ^
mydomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^myfolder "http\:\/\/mydomain\.com\:8080%{REQUEST_URI}" [P,QSA,L]


NOTE: Replace mydomain.com & myfolder with the correct values. You must add additional code fragments for each new sub-folder.

Was this answer helpful?

Also Read
Can I see a demo of Liferay running on GigaPros VPS?

For your peace of mind, you may test out the live demo of Liferay running on our own VPS hosting....